{"action":"created","comment":{"url":"https://api.github.com/repos/OCA/account-invoicing/pulls/comments/39439655","id":39439655,"diff_hunk":"@@ -0,0 +1,58 @@\n+# -*- encoding: utf-8 -*-\n+##############################################################################\n+#\n+#    Account - Pricelist on Invoices for Odoo\n+#    Copyright (C) 2015-Today GRAP (http://www.grap.coop)\n+#    @author Sylvain LE GAL (https://twitter.com/legalsylvain)\n+#\n+#    This program is free software: you can redistribute it and/or modify\n+#    it under the terms of the GNU Affero General Public License as\n+#    published by the Free Software Foundation, either version 3 of the\n+#    License, or (at your option) any later version.\n+#\n+#    This program is distributed in the hope that it will be useful,\n+#    but WITHOUT ANY WARRANTY; without even the implied warranty of\n+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+#    GNU Affero General Public License for more details.\n+#\n+#    You should have received a copy of the GNU Affero General Public License\n+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+#\n+##############################################################################\n+\n+from openerp import models, fields, api\n+\n+\n+class AccountInvoice(models.Model):\n+    _inherit = 'account.invoice'\n+\n+    # Column Section\n+    pricelist_id = fields.Many2one(\n+        comodel_name='product.pricelist', string='Pricelist',\n+        help=\"The pricelist of the partner, when the invoice is created\"\n+        \" or the partner has changed. This is a technical field used\"\n+        \" for reporting.\")\n+\n+    @api.multi\n+    def onchange_partner_id(","path":"account_invoice_pricelist/model/account_invoice.py","position":37,"original_position":37,"commit_id":"8ff001b4f78cd5eeb8c17724494cffdc466cd7fb","original_commit_id":"8ff001b4f78cd5eeb8c17724494cffdc466cd7fb","user":{"login":"legalsylvain","id":3407482,"avatar_url":"https://avatars.githubusercontent.com/u/3407482?v=3","gravatar_id":"","url":"https://api.github.com/users/legalsylvain","html_url":"https://github.com/legalsylvain","followers_url":"https://api.github.com/users/legalsylvain/followers","following_url":"https://api.github.com/users/legalsylvain/following{/other_user}","gists_url":"https://api.github.com/users/legalsylvain/gists{/gist_id}","starred_url":"https://api.github.com/users/legalsylvain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/legalsylvain/subscriptions","organizations_url":"https://api.github.com/users/legalsylvain/orgs","repos_url":"https://api.github.com/users/legalsylvain/repos","events_url":"https://api.github.com/users/legalsylvain/events{/privacy}","received_events_url":"https://api.github.com/users/legalsylvain/received_events","type":"User","site_admin":false},"body":"@moylop260 : \r\nI'm not sure you're pointing a stable version and with the same framework.\r\nin V8 (last stable version) : \r\naccount module: product_id_change : https://github.com/odoo/odoo/blob/8.0/addons/account/account_invoice.py#L1308\r\naccount_asset : (no overload) : https://github.com/odoo/odoo/blob/8.0/addons/account_asset/account_asset_invoice.py\r\n\r\nDo you have some example in V8 ?\r\nkind regards.","created_at":"2015-09-14T20:02:28Z","updated_at":"2015-09-14T20:02:28Z","html_url":"https://github.com/OCA/account-invoicing/pull/99#discussion_r39439655","pull_request_url":"https://api.github.com/repos/OCA/account-invoicing/pulls/99","_links":{"self":{"href":"https://api.github.com/repos/OCA/account-invoicing/pulls/comments/39439655"},"html":{"href":"https://github.com/OCA/account-invoicing/pull/99#discussion_r39439655"},"pull_request":{"href":"https://api.github.com/repos/OCA/account-invoicing/pulls/99"}}},"pull_request":{"url":"https://api.github.com/repos/OCA/account-invoicing/pulls/99","id":43750233,"html_url":"https://github.com/OCA/account-invoicing/pull/99","diff_url":"https://github.com/OCA/account-invoicing/pull/99.diff","patch_url":"https://github.com/OCA/account-invoicing/pull/99.patch","issue_url":"https://api.github.com/repos/OCA/account-invoicing/issues/99","number":99,"state":"open","locked":false,"title":"[8.0][ADD] account invoice pricelist","user":{"login":"legalsylvain","id":3407482,"avatar_url":"https://avatars.githubusercontent.com/u/3407482?v=3","gravatar_id":"","url":"https://api.github.com/users/legalsylvain","html_url":"https://github.com/legalsylvain","followers_url":"https://api.github.com/users/legalsylvain/followers","following_url":"https://api.github.com/users/legalsylvain/following{/other_user}","gists_url":"https://api.github.com/users/legalsylvain/gists{/gist_id}","starred_url":"https://api.github.com/users/legalsylvain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/legalsylvain/subscriptions","organizations_url":"https://api.github.com/users/legalsylvain/orgs","repos_url":"https://api.github.com/users/legalsylvain/repos","events_url":"https://api.github.com/users/legalsylvain/events{/privacy}","received_events_url":"https://api.github.com/users/legalsylvain/received_events","type":"User","site_admin":false},"body":"This module add a pricelist field on account invoices.\r\nFor the end-users,\r\n* It works like in sale / purchase order. Change partner changes pricelist. \r\n* Pricelist field is readonly because \"on change\" feature is not implemented; (See roadmap section);\r\n* search view updated to group by pricelist ;\r\n\r\nFor developers, it's possible to write reporting depending of this field;\r\n\r\nThanks for your review. \r\nRegards.","created_at":"2015-08-31T10:16:55Z","updated_at":"2015-09-14T20:02:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"52eec4ea68b805fd8a8af113998328ad4a735378","assignee":null,"milestone":{"url":"https://api.github.com/repos/OCA/account-invoicing/milestones/3","html_url":"https://github.com/OCA/account-invoicing/milestones/8.0","labels_url":"https://api.github.com/repos/OCA/account-invoicing/milestones/3/labels","id":1281765,"number":3,"title":"8.0","description":"","creator":{"login":"max3903","id":939952,"avatar_url":"https://avatars.githubusercontent.com/u/939952?v=3","gravatar_id":"","url":"https://api.github.com/users/max3903","html_url":"https://github.com/max3903","followers_url":"https://api.github.com/users/max3903/followers","following_url":"https://api.github.com/users/max3903/following{/other_user}","gists_url":"https://api.github.com/users/max3903/gists{/gist_id}","starred_url":"https://api.github.com/users/max3903/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/max3903/subscriptions","organizations_url":"https://api.github.com/users/max3903/orgs","repos_url":"https://api.github.com/users/max3903/repos","events_url":"https://api.github.com/users/max3903/events{/privacy}","received_events_url":"https://api.github.com/users/max3903/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2015-08-31T13:05:20Z","updated_at":"2015-08-31T13:05:32Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/OCA/account-invoicing/pulls/99/commits","review_comments_url":"https://api.github.com/repos/OCA/account-invoicing/pulls/99/comments","review_comment_url":"https://api.github.com/repos/OCA/account-invoicing/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OCA/account-invoicing/issues/99/comments","statuses_url":"https://api.github.com/repos/OCA/account-invoicing/statuses/8ff001b4f78cd5eeb8c17724494cffdc466cd7fb","head":{"label":"grap:8.0_account_invoice_pricelist","ref":"8.0_account_invoice_pricelist","sha":"8ff001b4f78cd5eeb8c17724494cffdc466cd7fb","user":{"login":"grap","id":6085360,"avatar_url":"https://avatars.githubusercontent.com/u/6085360?v=3","gravatar_id":"","url":"https://api.github.com/users/grap","html_url":"https://github.com/grap","followers_url":"https://api.github.com/users/grap/followers","following_url":"https://api.github.com/users/grap/following{/other_user}","gists_url":"https://api.github.com/users/grap/gists{/gist_id}","starred_url":"https://api.github.com/users/grap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grap/subscriptions","organizations_url":"https://api.github.com/users/grap/orgs","repos_url":"https://api.github.com/users/grap/repos","events_url":"https://api.github.com/users/grap/events{/privacy}","received_events_url":"https://api.github.com/users/grap/received_events","type":"Organization","site_admin":false},"repo":{"id":41669180,"name":"account-invoicing","full_name":"grap/account-invoicing","owner":{"login":"grap","id":6085360,"avatar_url":"https://avatars.githubusercontent.com/u/6085360?v=3","gravatar_id":"","url":"https://api.github.com/users/grap","html_url":"https://github.com/grap","followers_url":"https://api.github.com/users/grap/followers","following_url":"https://api.github.com/users/grap/following{/other_user}","gists_url":"https://api.github.com/users/grap/gists{/gist_id}","starred_url":"https://api.github.com/users/grap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grap/subscriptions","organizations_url":"https://api.github.com/users/grap/orgs","repos_url":"https://api.github.com/users/grap/repos","events_url":"https://api.github.com/users/grap/events{/privacy}","received_events_url":"https://api.github.com/users/grap/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/grap/account-invoicing","description":"Odoo Invoicing Extension Addons","fork":true,"url":"https://api.github.com/repos/grap/account-invoicing","forks_url":"https://api.github.com/repos/grap/account-invoicing/forks","keys_url":"https://api.github.com/repos/grap/account-invoicing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grap/account-invoicing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grap/account-invoicing/teams","hooks_url":"https://api.github.com/repos/grap/account-invoicing/hooks","issue_events_url":"https://api.github.com/repos/grap/account-invoicing/issues/events{/number}","events_url":"https://api.github.com/repos/grap/account-invoicing/events","assignees_url":"https://api.github.com/repos/grap/account-invoicing/assignees{/user}","branches_url":"https://api.github.com/repos/grap/account-invoicing/branches{/branch}","tags_url":"https://api.github.com/repos/grap/account-invoicing/tags","blobs_url":"https://api.github.com/repos/grap/account-invoicing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grap/account-invoicing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grap/account-invoicing/git/refs{/sha}","trees_url":"https://api.github.com/repos/grap/account-invoicing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grap/account-invoicing/statuses/{sha}","languages_url":"https://api.github.com/repos/grap/account-invoicing/languages","stargazers_url":"https://api.github.com/repos/grap/account-invoicing/stargazers","contributors_url":"https://api.github.com/repos/grap/account-invoicing/contributors","subscribers_url":"https://api.github.com/repos/grap/account-invoicing/subscribers","subscription_url":"https://api.github.com/repos/grap/account-invoicing/subscription","commits_url":"https://api.github.com/repos/grap/account-invoicing/commits{/sha}","git_commits_url":"https://api.github.com/repos/grap/account-invoicing/git/commits{/sha}","comments_url":"https://api.github.com/repos/grap/account-invoicing/comments{/number}","issue_comment_url":"https://api.github.com/repos/grap/account-invoicing/issues/comments{/number}","contents_url":"https://api.github.com/repos/grap/account-invoicing/contents/{+path}","compare_url":"https://api.github.com/repos/grap/account-invoicing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grap/account-invoicing/merges","archive_url":"https://api.github.com/repos/grap/account-invoicing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grap/account-invoicing/downloads","issues_url":"https://api.github.com/repos/grap/account-invoicing/issues{/number}","pulls_url":"https://api.github.com/repos/grap/account-invoicing/pulls{/number}","milestones_url":"https://api.github.com/repos/grap/account-invoicing/milestones{/number}","notifications_url":"https://api.github.com/repos/grap/account-invoicing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grap/account-invoicing/labels{/name}","releases_url":"https://api.github.com/repos/grap/account-invoicing/releases{/id}","created_at":"2015-08-31T10:12:34Z","updated_at":"2015-08-31T10:12:35Z","pushed_at":"2015-09-08T22:14:45Z","git_url":"git://github.com/grap/account-invoicing.git","ssh_url":"git@github.com:grap/account-invoicing.git","clone_url":"https://github.com/grap/account-invoicing.git","svn_url":"https://github.com/grap/account-invoicing","homepage":"","size":1219,"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":"8.0"}},"base":{"label":"OCA:8.0","ref":"8.0","sha":"ae9873dd164b11c828aa705fb90e1e25743282f5","user":{"login":"OCA","id":7600578,"avatar_url":"https://avatars.githubusercontent.com/u/7600578?v=3","gravatar_id":"","url":"https://api.github.com/users/OCA","html_url":"https://github.com/OCA","followers_url":"https://api.github.com/users/OCA/followers","following_url":"https://api.github.com/users/OCA/following{/other_user}","gists_url":"https://api.github.com/users/OCA/gists{/gist_id}","starred_url":"https://api.github.com/users/OCA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OCA/subscriptions","organizations_url":"https://api.github.com/users/OCA/orgs","repos_url":"https://api.github.com/users/OCA/repos","events_url":"https://api.github.com/users/OCA/events{/privacy}","received_events_url":"https://api.github.com/users/OCA/received_events","type":"Organization","site_admin":false},"repo":{"id":20881777,"name":"account-invoicing","full_name":"OCA/account-invoicing","owner":{"login":"OCA","id":7600578,"avatar_url":"https://avatars.githubusercontent.com/u/7600578?v=3","gravatar_id":"","url":"https://api.github.com/users/OCA","html_url":"https://github.com/OCA","followers_url":"https://api.github.com/users/OCA/followers","following_url":"https://api.github.com/users/OCA/following{/other_user}","gists_url":"https://api.github.com/users/OCA/gists{/gist_id}","starred_url":"https://api.github.com/users/OCA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OCA/subscriptions","organizations_url":"https://api.github.com/users/OCA/orgs","repos_url":"https://api.github.com/users/OCA/repos","events_url":"https://api.github.com/users/OCA/events{/privacy}","received_events_url":"https://api.github.com/users/OCA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OCA/account-invoicing","description":"Odoo Invoicing Extension Addons","fork":false,"url":"https://api.github.com/repos/OCA/account-invoicing","forks_url":"https://api.github.com/repos/OCA/account-invoicing/forks","keys_url":"https://api.github.com/repos/OCA/account-invoicing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OCA/account-invoicing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OCA/account-invoicing/teams","hooks_url":"https://api.github.com/repos/OCA/account-invoicing/hooks","issue_events_url":"https://api.github.com/repos/OCA/account-invoicing/issues/events{/number}","events_url":"https://api.github.com/repos/OCA/account-invoicing/events","assignees_url":"https://api.github.com/repos/OCA/account-invoicing/assignees{/user}","branches_url":"https://api.github.com/repos/OCA/account-invoicing/branches{/branch}","tags_url":"https://api.github.com/repos/OCA/account-invoicing/tags","blobs_url":"https://api.github.com/repos/OCA/account-invoicing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OCA/account-invoicing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OCA/account-invoicing/git/refs{/sha}","trees_url":"https://api.github.com/repos/OCA/account-invoicing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OCA/account-invoicing/statuses/{sha}","languages_url":"https://api.github.com/repos/OCA/account-invoicing/languages","stargazers_url":"https://api.github.com/repos/OCA/account-invoicing/stargazers","contributors_url":"https://api.github.com/repos/OCA/account-invoicing/contributors","subscribers_url":"https://api.github.com/repos/OCA/account-invoicing/subscribers","subscription_url":"https://api.github.com/repos/OCA/account-invoicing/subscription","commits_url":"https://api.github.com/repos/OCA/account-invoicing/commits{/sha}","git_commits_url":"https://api.github.com/repos/OCA/account-invoicing/git/commits{/sha}","comments_url":"https://api.github.com/repos/OCA/account-invoicing/comments{/number}","issue_comment_url":"https://api.github.com/repos/OCA/account-invoicing/issues/comments{/number}","contents_url":"https://api.github.com/repos/OCA/account-invoicing/contents/{+path}","compare_url":"https://api.github.com/repos/OCA/account-invoicing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OCA/account-invoicing/merges","archive_url":"https://api.github.com/repos/OCA/account-invoicing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OCA/account-invoicing/downloads","issues_url":"https://api.github.com/repos/OCA/account-invoicing/issues{/number}","pulls_url":"https://api.github.com/repos/OCA/account-invoicing/pulls{/number}","milestones_url":"https://api.github.com/repos/OCA/account-invoicing/milestones{/number}","notifications_url":"https://api.github.com/repos/OCA/account-invoicing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OCA/account-invoicing/labels{/name}","releases_url":"https://api.github.com/repos/OCA/account-invoicing/releases{/id}","created_at":"2014-06-16T10:59:46Z","updated_at":"2015-09-12T14:14:56Z","pushed_at":"2015-09-14T14:31:44Z","git_url":"git://github.com/OCA/account-invoicing.git","ssh_url":"git@github.com:OCA/account-invoicing.git","clone_url":"https://github.com/OCA/account-invoicing.git","svn_url":"https://github.com/OCA/account-invoicing","homepage":"","size":2523,"stargazers_count":11,"watchers_count":11,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":64,"mirror_url":null,"open_issues_count":18,"forks":64,"open_issues":18,"watchers":11,"default_branch":"8.0"}},"_links":{"self":{"href":"https://api.github.com/repos/OCA/account-invoicing/pulls/99"},"html":{"href":"https://github.com/OCA/account-invoicing/pull/99"},"issue":{"href":"https://api.github.com/repos/OCA/account-invoicing/issues/99"},"comments":{"href":"https://api.github.com/repos/OCA/account-invoicing/issues/99/comments"},"review_comments":{"href":"https://api.github.com/repos/OCA/account-invoicing/pulls/99/comments"},"review_comment":{"href":"https://api.github.com/repos/OCA/account-invoicing/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OCA/account-invoicing/pulls/99/commits"},"statuses":{"href":"https://api.github.com/repos/OCA/account-invoicing/statuses/8ff001b4f78cd5eeb8c17724494cffdc466cd7fb"}}}}