{"action":"created","comment":{"url":"https://api.github.com/repos/OCA/margin-analysis/pulls/comments/37198451","id":37198451,"diff_hunk":"@@ -0,0 +1,74 @@\n+# -*- coding: utf-8 -*-\n+##############################################################################\n+#\n+#    Copyright (c) 2012 Camptocamp SA (http://www.camptocamp.com)\n+#    All Right Reserved\n+#\n+#    Author : Joel Grand-Guillaume\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 fields, api\n+from openerp.models import Model\n+import openerp.addons.decimal_precision as dp\n+\n+\n+class ProductProduct(Model):\n+    _inherit = 'product.product'\n+\n+    @api.multi\n+    @api.depends(\n+        'product_tmpl_id.list_price', 'replenishment_cost', 'taxes_id.type',\n+        'taxes_id.price_include', 'taxes_id.amount',\n+        'taxes_id.include_base_amount', 'taxes_id.child_depend')\n+    def _get_margin(self):\n+        tax_obj = self.pool['account.tax']","path":"product_standard_margin/models/product_product.py","position":38,"original_position":38,"commit_id":"b27d54a75c9163a0e592a5c26adb587a4c1e91f6","original_commit_id":"b27d54a75c9163a0e592a5c26adb587a4c1e91f6","user":{"login":"yvaucher","id":4158438,"avatar_url":"https://avatars.githubusercontent.com/u/4158438?v=3","gravatar_id":"","url":"https://api.github.com/users/yvaucher","html_url":"https://github.com/yvaucher","followers_url":"https://api.github.com/users/yvaucher/followers","following_url":"https://api.github.com/users/yvaucher/following{/other_user}","gists_url":"https://api.github.com/users/yvaucher/gists{/gist_id}","starred_url":"https://api.github.com/users/yvaucher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yvaucher/subscriptions","organizations_url":"https://api.github.com/users/yvaucher/orgs","repos_url":"https://api.github.com/users/yvaucher/repos","events_url":"https://api.github.com/users/yvaucher/events{/privacy}","received_events_url":"https://api.github.com/users/yvaucher/received_events","type":"User","site_admin":false},"body":"self.env ?","created_at":"2015-08-17T15:17:45Z","updated_at":"2015-08-17T15:17:45Z","html_url":"https://github.com/OCA/margin-analysis/pull/26#discussion_r37198451","pull_request_url":"https://api.github.com/repos/OCA/margin-analysis/pulls/26","_links":{"self":{"href":"https://api.github.com/repos/OCA/margin-analysis/pulls/comments/37198451"},"html":{"href":"https://github.com/OCA/margin-analysis/pull/26#discussion_r37198451"},"pull_request":{"href":"https://api.github.com/repos/OCA/margin-analysis/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/OCA/margin-analysis/pulls/26","id":40787233,"html_url":"https://github.com/OCA/margin-analysis/pull/26","diff_url":"https://github.com/OCA/margin-analysis/pull/26.diff","patch_url":"https://github.com/OCA/margin-analysis/pull/26.patch","issue_url":"https://api.github.com/repos/OCA/margin-analysis/issues/26","number":26,"state":"open","locked":false,"title":"[PORT][8.0] product_standard_margin","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":"* port product_standard_margin;\r\n* use new api;\r\n* apply TODO notes, due to the new V8 api;\r\n* use new stored field list_price_vat_excl;\r\n\r\n* Note : Please review first #25.\r\n\r\nThanks for your review.\r\nKind regards. ","created_at":"2015-07-24T15:35:36Z","updated_at":"2015-08-17T15:17:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c4e25d5bcdd7339a598a63b988cd45093e103b46","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OCA/margin-analysis/pulls/26/commits","review_comments_url":"https://api.github.com/repos/OCA/margin-analysis/pulls/26/comments","review_comment_url":"https://api.github.com/repos/OCA/margin-analysis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OCA/margin-analysis/issues/26/comments","statuses_url":"https://api.github.com/repos/OCA/margin-analysis/statuses/b27d54a75c9163a0e592a5c26adb587a4c1e91f6","head":{"label":"grap:8.0_PORT_product_standard_margin","ref":"8.0_PORT_product_standard_margin","sha":"b27d54a75c9163a0e592a5c26adb587a4c1e91f6","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":38440700,"name":"margin-analysis","full_name":"grap/margin-analysis","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/margin-analysis","description":"Odoo Financial Controlling (margin, costs, ...)","fork":true,"url":"https://api.github.com/repos/grap/margin-analysis","forks_url":"https://api.github.com/repos/grap/margin-analysis/forks","keys_url":"https://api.github.com/repos/grap/margin-analysis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grap/margin-analysis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grap/margin-analysis/teams","hooks_url":"https://api.github.com/repos/grap/margin-analysis/hooks","issue_events_url":"https://api.github.com/repos/grap/margin-analysis/issues/events{/number}","events_url":"https://api.github.com/repos/grap/margin-analysis/events","assignees_url":"https://api.github.com/repos/grap/margin-analysis/assignees{/user}","branches_url":"https://api.github.com/repos/grap/margin-analysis/branches{/branch}","tags_url":"https://api.github.com/repos/grap/margin-analysis/tags","blobs_url":"https://api.github.com/repos/grap/margin-analysis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grap/margin-analysis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grap/margin-analysis/git/refs{/sha}","trees_url":"https://api.github.com/repos/grap/margin-analysis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grap/margin-analysis/statuses/{sha}","languages_url":"https://api.github.com/repos/grap/margin-analysis/languages","stargazers_url":"https://api.github.com/repos/grap/margin-analysis/stargazers","contributors_url":"https://api.github.com/repos/grap/margin-analysis/contributors","subscribers_url":"https://api.github.com/repos/grap/margin-analysis/subscribers","subscription_url":"https://api.github.com/repos/grap/margin-analysis/subscription","commits_url":"https://api.github.com/repos/grap/margin-analysis/commits{/sha}","git_commits_url":"https://api.github.com/repos/grap/margin-analysis/git/commits{/sha}","comments_url":"https://api.github.com/repos/grap/margin-analysis/comments{/number}","issue_comment_url":"https://api.github.com/repos/grap/margin-analysis/issues/comments{/number}","contents_url":"https://api.github.com/repos/grap/margin-analysis/contents/{+path}","compare_url":"https://api.github.com/repos/grap/margin-analysis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grap/margin-analysis/merges","archive_url":"https://api.github.com/repos/grap/margin-analysis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grap/margin-analysis/downloads","issues_url":"https://api.github.com/repos/grap/margin-analysis/issues{/number}","pulls_url":"https://api.github.com/repos/grap/margin-analysis/pulls{/number}","milestones_url":"https://api.github.com/repos/grap/margin-analysis/milestones{/number}","notifications_url":"https://api.github.com/repos/grap/margin-analysis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grap/margin-analysis/labels{/name}","releases_url":"https://api.github.com/repos/grap/margin-analysis/releases{/id}","created_at":"2015-07-02T15:27:04Z","updated_at":"2015-07-02T15:27:04Z","pushed_at":"2015-08-17T12:08:00Z","git_url":"git://github.com/grap/margin-analysis.git","ssh_url":"git@github.com:grap/margin-analysis.git","clone_url":"https://github.com/grap/margin-analysis.git","svn_url":"https://github.com/grap/margin-analysis","homepage":"","size":604,"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":"9dd086f248094c91e45096d1d17a8cd2929d5ac1","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":20893227,"name":"margin-analysis","full_name":"OCA/margin-analysis","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/margin-analysis","description":"Odoo Financial Controlling (margin, costs, ...)","fork":false,"url":"https://api.github.com/repos/OCA/margin-analysis","forks_url":"https://api.github.com/repos/OCA/margin-analysis/forks","keys_url":"https://api.github.com/repos/OCA/margin-analysis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OCA/margin-analysis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OCA/margin-analysis/teams","hooks_url":"https://api.github.com/repos/OCA/margin-analysis/hooks","issue_events_url":"https://api.github.com/repos/OCA/margin-analysis/issues/events{/number}","events_url":"https://api.github.com/repos/OCA/margin-analysis/events","assignees_url":"https://api.github.com/repos/OCA/margin-analysis/assignees{/user}","branches_url":"https://api.github.com/repos/OCA/margin-analysis/branches{/branch}","tags_url":"https://api.github.com/repos/OCA/margin-analysis/tags","blobs_url":"https://api.github.com/repos/OCA/margin-analysis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OCA/margin-analysis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OCA/margin-analysis/git/refs{/sha}","trees_url":"https://api.github.com/repos/OCA/margin-analysis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OCA/margin-analysis/statuses/{sha}","languages_url":"https://api.github.com/repos/OCA/margin-analysis/languages","stargazers_url":"https://api.github.com/repos/OCA/margin-analysis/stargazers","contributors_url":"https://api.github.com/repos/OCA/margin-analysis/contributors","subscribers_url":"https://api.github.com/repos/OCA/margin-analysis/subscribers","subscription_url":"https://api.github.com/repos/OCA/margin-analysis/subscription","commits_url":"https://api.github.com/repos/OCA/margin-analysis/commits{/sha}","git_commits_url":"https://api.github.com/repos/OCA/margin-analysis/git/commits{/sha}","comments_url":"https://api.github.com/repos/OCA/margin-analysis/comments{/number}","issue_comment_url":"https://api.github.com/repos/OCA/margin-analysis/issues/comments{/number}","contents_url":"https://api.github.com/repos/OCA/margin-analysis/contents/{+path}","compare_url":"https://api.github.com/repos/OCA/margin-analysis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OCA/margin-analysis/merges","archive_url":"https://api.github.com/repos/OCA/margin-analysis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OCA/margin-analysis/downloads","issues_url":"https://api.github.com/repos/OCA/margin-analysis/issues{/number}","pulls_url":"https://api.github.com/repos/OCA/margin-analysis/pulls{/number}","milestones_url":"https://api.github.com/repos/OCA/margin-analysis/milestones{/number}","notifications_url":"https://api.github.com/repos/OCA/margin-analysis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OCA/margin-analysis/labels{/name}","releases_url":"https://api.github.com/repos/OCA/margin-analysis/releases{/id}","created_at":"2014-06-16T17:11:10Z","updated_at":"2015-05-06T19:58:19Z","pushed_at":"2015-08-17T12:08:00Z","git_url":"git://github.com/OCA/margin-analysis.git","ssh_url":"git@github.com:OCA/margin-analysis.git","clone_url":"https://github.com/OCA/margin-analysis.git","svn_url":"https://github.com/OCA/margin-analysis","homepage":"","size":897,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":6,"forks":19,"open_issues":6,"watchers":5,"default_branch":"8.0"}},"_links":{"self":{"href":"https://api.github.com/repos/OCA/margin-analysis/pulls/26"},"html":{"href":"https://github.com/OCA/margin-analysis/pull/26"},"issue":{"href":"https://api.github.com/repos/OCA/margin-analysis/issues/26"},"comments":{"href":"https://api.github.com/repos/OCA/margin-analysis/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/OCA/margin-analysis/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/OCA/margin-analysis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OCA/margin-analysis/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/OCA/margin-analysis/statuses/b27d54a75c9163a0e592a5c26adb587a4c1e91f6"}}}}