{"action":"closed","number":13983,"pull_request":{"url":"https://api.github.com/repos/odoo/odoo/pulls/13983","id":90930401,"html_url":"https://github.com/odoo/odoo/pull/13983","diff_url":"https://github.com/odoo/odoo/pull/13983.diff","patch_url":"https://github.com/odoo/odoo/pull/13983.patch","issue_url":"https://api.github.com/repos/odoo/odoo/issues/13983","number":13983,"state":"closed","locked":false,"title":"[IMP] web: inconsistencies between custom button icons in Form views and List View buttons","user":{"login":"danidee10","id":11032373,"avatar_url":"https://avatars.githubusercontent.com/u/11032373?v=3","gravatar_id":"","url":"https://api.github.com/users/danidee10","html_url":"https://github.com/danidee10","followers_url":"https://api.github.com/users/danidee10/followers","following_url":"https://api.github.com/users/danidee10/following{/other_user}","gists_url":"https://api.github.com/users/danidee10/gists{/gist_id}","starred_url":"https://api.github.com/users/danidee10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danidee10/subscriptions","organizations_url":"https://api.github.com/users/danidee10/orgs","repos_url":"https://api.github.com/users/danidee10/repos","events_url":"https://api.github.com/users/danidee10/events{/privacy}","received_events_url":"https://api.github.com/users/danidee10/received_events","type":"User","site_admin":false},"body":"Description of the issue/feature this PR addresses:\nThis PR aims to fix inconsistencies between custom button icons in form views and list views, There is no condition in base.xml to check if the button icon is from an external source or a custom module.\n\nFor a better description of what this PR aims to solve please read my answer to this [Stackoverflow question](http://stackoverflow.com/questions/39412916/how-can-i-add-images-or-icons-inside-a-custom-module-in-odoo-9)\n\nCurrent behavior before PR:\nIn a form view we can add a custom icon to a button by specifying the full path to the icon. e.g\n\n`<button name=\"do_stuff\" type=\"object\" icon=\"/my_module/static/src/img/icons/icon.png\" />`\n\nThis is not the same behaviour for List View icons, even if we specify the full path to the icon, Odoo still appends the default icon location path (/web/static/src/img/icons) and .png to the icon location. so we end up with a path like this\n\n`<img src=\"{hostname:port}/web/static/src/img/icons//my_module/static/src/img/icons/icon.png.png\" />`\n\nTo overcome this, you have to use sleazy hacks like this:\n\n`<button name=\"do_stuff\" icon=\"../../../../../my_module/static/src/img/icons/icon\" type=\"object\"/>`\n\nthis would obviously break, because it's a relative link\n\n**Note: This problem is also present in 9.0**\n\nDesired behavior after PR is merged:\nCustom ListView button icons can now be declared the same way you would declare a custom icon for a button in a form view.\n## \n\nI confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr\n","created_at":"2016-10-26T03:26:19Z","updated_at":"2016-11-04T09:42:49Z","closed_at":"2016-11-04T09:42:49Z","merged_at":null,"merge_commit_sha":"ebb0f420f9ab0b291bfe4b76bcc7901c9419ff97","assignee":{"login":"ged-odoo","id":7579538,"avatar_url":"https://avatars.githubusercontent.com/u/7579538?v=3","gravatar_id":"","url":"https://api.github.com/users/ged-odoo","html_url":"https://github.com/ged-odoo","followers_url":"https://api.github.com/users/ged-odoo/followers","following_url":"https://api.github.com/users/ged-odoo/following{/other_user}","gists_url":"https://api.github.com/users/ged-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/ged-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ged-odoo/subscriptions","organizations_url":"https://api.github.com/users/ged-odoo/orgs","repos_url":"https://api.github.com/users/ged-odoo/repos","events_url":"https://api.github.com/users/ged-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/ged-odoo/received_events","type":"User","site_admin":false},"assignees":[{"login":"ged-odoo","id":7579538,"avatar_url":"https://avatars.githubusercontent.com/u/7579538?v=3","gravatar_id":"","url":"https://api.github.com/users/ged-odoo","html_url":"https://github.com/ged-odoo","followers_url":"https://api.github.com/users/ged-odoo/followers","following_url":"https://api.github.com/users/ged-odoo/following{/other_user}","gists_url":"https://api.github.com/users/ged-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/ged-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ged-odoo/subscriptions","organizations_url":"https://api.github.com/users/ged-odoo/orgs","repos_url":"https://api.github.com/users/ged-odoo/repos","events_url":"https://api.github.com/users/ged-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/ged-odoo/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/odoo/odoo/pulls/13983/commits","review_comments_url":"https://api.github.com/repos/odoo/odoo/pulls/13983/comments","review_comment_url":"https://api.github.com/repos/odoo/odoo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/13983/comments","statuses_url":"https://api.github.com/repos/odoo/odoo/statuses/2515ffbff661e37accd829b59b6fcf965b8a56f9","head":{"label":"danidee10:8.0","ref":"8.0","sha":"2515ffbff661e37accd829b59b6fcf965b8a56f9","user":{"login":"danidee10","id":11032373,"avatar_url":"https://avatars.githubusercontent.com/u/11032373?v=3","gravatar_id":"","url":"https://api.github.com/users/danidee10","html_url":"https://github.com/danidee10","followers_url":"https://api.github.com/users/danidee10/followers","following_url":"https://api.github.com/users/danidee10/following{/other_user}","gists_url":"https://api.github.com/users/danidee10/gists{/gist_id}","starred_url":"https://api.github.com/users/danidee10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danidee10/subscriptions","organizations_url":"https://api.github.com/users/danidee10/orgs","repos_url":"https://api.github.com/users/danidee10/repos","events_url":"https://api.github.com/users/danidee10/events{/privacy}","received_events_url":"https://api.github.com/users/danidee10/received_events","type":"User","site_admin":false},"repo":{"id":63472790,"name":"odoo","full_name":"danidee10/odoo","owner":{"login":"danidee10","id":11032373,"avatar_url":"https://avatars.githubusercontent.com/u/11032373?v=3","gravatar_id":"","url":"https://api.github.com/users/danidee10","html_url":"https://github.com/danidee10","followers_url":"https://api.github.com/users/danidee10/followers","following_url":"https://api.github.com/users/danidee10/following{/other_user}","gists_url":"https://api.github.com/users/danidee10/gists{/gist_id}","starred_url":"https://api.github.com/users/danidee10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danidee10/subscriptions","organizations_url":"https://api.github.com/users/danidee10/orgs","repos_url":"https://api.github.com/users/danidee10/repos","events_url":"https://api.github.com/users/danidee10/events{/privacy}","received_events_url":"https://api.github.com/users/danidee10/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danidee10/odoo","description":"Odoo (formerly OpenERP). Open Source Apps To Grow Your Business.","fork":true,"url":"https://api.github.com/repos/danidee10/odoo","forks_url":"https://api.github.com/repos/danidee10/odoo/forks","keys_url":"https://api.github.com/repos/danidee10/odoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danidee10/odoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danidee10/odoo/teams","hooks_url":"https://api.github.com/repos/danidee10/odoo/hooks","issue_events_url":"https://api.github.com/repos/danidee10/odoo/issues/events{/number}","events_url":"https://api.github.com/repos/danidee10/odoo/events","assignees_url":"https://api.github.com/repos/danidee10/odoo/assignees{/user}","branches_url":"https://api.github.com/repos/danidee10/odoo/branches{/branch}","tags_url":"https://api.github.com/repos/danidee10/odoo/tags","blobs_url":"https://api.github.com/repos/danidee10/odoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danidee10/odoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danidee10/odoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/danidee10/odoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danidee10/odoo/statuses/{sha}","languages_url":"https://api.github.com/repos/danidee10/odoo/languages","stargazers_url":"https://api.github.com/repos/danidee10/odoo/stargazers","contributors_url":"https://api.github.com/repos/danidee10/odoo/contributors","subscribers_url":"https://api.github.com/repos/danidee10/odoo/subscribers","subscription_url":"https://api.github.com/repos/danidee10/odoo/subscription","commits_url":"https://api.github.com/repos/danidee10/odoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/danidee10/odoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/danidee10/odoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/danidee10/odoo/issues/comments{/number}","contents_url":"https://api.github.com/repos/danidee10/odoo/contents/{+path}","compare_url":"https://api.github.com/repos/danidee10/odoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danidee10/odoo/merges","archive_url":"https://api.github.com/repos/danidee10/odoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danidee10/odoo/downloads","issues_url":"https://api.github.com/repos/danidee10/odoo/issues{/number}","pulls_url":"https://api.github.com/repos/danidee10/odoo/pulls{/number}","milestones_url":"https://api.github.com/repos/danidee10/odoo/milestones{/number}","notifications_url":"https://api.github.com/repos/danidee10/odoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danidee10/odoo/labels{/name}","releases_url":"https://api.github.com/repos/danidee10/odoo/releases{/id}","deployments_url":"https://api.github.com/repos/danidee10/odoo/deployments","created_at":"2016-07-16T08:14:04Z","updated_at":"2016-07-16T08:15:32Z","pushed_at":"2016-10-26T03:16:47Z","git_url":"git://github.com/danidee10/odoo.git","ssh_url":"git@github.com:danidee10/odoo.git","clone_url":"https://github.com/danidee10/odoo.git","svn_url":"https://github.com/danidee10/odoo","homepage":"https://www.odoo.com","size":1526629,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"9.0"}},"base":{"label":"odoo:8.0","ref":"8.0","sha":"5ee4344efd0074fac4006984c1eb1ccc4f335518","user":{"login":"odoo","id":6368483,"avatar_url":"https://avatars.githubusercontent.com/u/6368483?v=3","gravatar_id":"","url":"https://api.github.com/users/odoo","html_url":"https://github.com/odoo","followers_url":"https://api.github.com/users/odoo/followers","following_url":"https://api.github.com/users/odoo/following{/other_user}","gists_url":"https://api.github.com/users/odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odoo/subscriptions","organizations_url":"https://api.github.com/users/odoo/orgs","repos_url":"https://api.github.com/users/odoo/repos","events_url":"https://api.github.com/users/odoo/events{/privacy}","received_events_url":"https://api.github.com/users/odoo/received_events","type":"Organization","site_admin":false},"repo":{"id":19745004,"name":"odoo","full_name":"odoo/odoo","owner":{"login":"odoo","id":6368483,"avatar_url":"https://avatars.githubusercontent.com/u/6368483?v=3","gravatar_id":"","url":"https://api.github.com/users/odoo","html_url":"https://github.com/odoo","followers_url":"https://api.github.com/users/odoo/followers","following_url":"https://api.github.com/users/odoo/following{/other_user}","gists_url":"https://api.github.com/users/odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odoo/subscriptions","organizations_url":"https://api.github.com/users/odoo/orgs","repos_url":"https://api.github.com/users/odoo/repos","events_url":"https://api.github.com/users/odoo/events{/privacy}","received_events_url":"https://api.github.com/users/odoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/odoo/odoo","description":"Odoo (formerly OpenERP). Open Source Apps To Grow Your Business.","fork":false,"url":"https://api.github.com/repos/odoo/odoo","forks_url":"https://api.github.com/repos/odoo/odoo/forks","keys_url":"https://api.github.com/repos/odoo/odoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/odoo/odoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/odoo/odoo/teams","hooks_url":"https://api.github.com/repos/odoo/odoo/hooks","issue_events_url":"https://api.github.com/repos/odoo/odoo/issues/events{/number}","events_url":"https://api.github.com/repos/odoo/odoo/events","assignees_url":"https://api.github.com/repos/odoo/odoo/assignees{/user}","branches_url":"https://api.github.com/repos/odoo/odoo/branches{/branch}","tags_url":"https://api.github.com/repos/odoo/odoo/tags","blobs_url":"https://api.github.com/repos/odoo/odoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/odoo/odoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/odoo/odoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/odoo/odoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/odoo/odoo/statuses/{sha}","languages_url":"https://api.github.com/repos/odoo/odoo/languages","stargazers_url":"https://api.github.com/repos/odoo/odoo/stargazers","contributors_url":"https://api.github.com/repos/odoo/odoo/contributors","subscribers_url":"https://api.github.com/repos/odoo/odoo/subscribers","subscription_url":"https://api.github.com/repos/odoo/odoo/subscription","commits_url":"https://api.github.com/repos/odoo/odoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/odoo/odoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/odoo/odoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/odoo/odoo/issues/comments{/number}","contents_url":"https://api.github.com/repos/odoo/odoo/contents/{+path}","compare_url":"https://api.github.com/repos/odoo/odoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/odoo/odoo/merges","archive_url":"https://api.github.com/repos/odoo/odoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/odoo/odoo/downloads","issues_url":"https://api.github.com/repos/odoo/odoo/issues{/number}","pulls_url":"https://api.github.com/repos/odoo/odoo/pulls{/number}","milestones_url":"https://api.github.com/repos/odoo/odoo/milestones{/number}","notifications_url":"https://api.github.com/repos/odoo/odoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/odoo/odoo/labels{/name}","releases_url":"https://api.github.com/repos/odoo/odoo/releases{/id}","deployments_url":"https://api.github.com/repos/odoo/odoo/deployments","created_at":"2014-05-13T15:38:58Z","updated_at":"2016-11-04T08:58:14Z","pushed_at":"2016-11-04T09:23:54Z","git_url":"git://github.com/odoo/odoo.git","ssh_url":"git@github.com:odoo/odoo.git","clone_url":"https://github.com/odoo/odoo.git","svn_url":"https://github.com/odoo/odoo","homepage":"https://www.odoo.com","size":2056973,"stargazers_count":5334,"watchers_count":5334,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5056,"mirror_url":null,"open_issues_count":3232,"forks":5056,"open_issues":3232,"watchers":5334,"default_branch":"10.0"}},"_links":{"self":{"href":"https://api.github.com/repos/odoo/odoo/pulls/13983"},"html":{"href":"https://github.com/odoo/odoo/pull/13983"},"issue":{"href":"https://api.github.com/repos/odoo/odoo/issues/13983"},"comments":{"href":"https://api.github.com/repos/odoo/odoo/issues/13983/comments"},"review_comments":{"href":"https://api.github.com/repos/odoo/odoo/pulls/13983/comments"},"review_comment":{"href":"https://api.github.com/repos/odoo/odoo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/odoo/odoo/pulls/13983/commits"},"statuses":{"href":"https://api.github.com/repos/odoo/odoo/statuses/2515ffbff661e37accd829b59b6fcf965b8a56f9"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":4,"review_comments":0,"commits":2,"additions":14,"deletions":2,"changed_files":2}}
{"actor":{"display_login":"ged-odoo"}}