{"action":"created","comment":{"url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/comments/93987488","pull_request_review_id":14517812,"id":93987488,"diff_hunk":"@@ -0,0 +1,45 @@\n+# -*- coding: utf-8 -*-\n+\n+from __future__ import division\n+\n+from openerp import api, models\n+\n+\n+class StockMove(models.Model):\n+\n+    _inherit = \"stock.move\"\n+\n+    @api.multi\n+    def _recalculation_average_cost_price(self, signal=1):\n+        \"\"\" move is a browse record \"\"\"\n+        for move in self:\n+            if move.product_qty == 0:\n+                return\n+            for quant in move.reserved_quant_ids:\n+                if quant.qty <= 0:\n+                    return\n+            average_valuation_price = 0.0\n+            qty_available = move.product_id.product_tmpl_id.qty_available\n+            average_valuation_price = sum(\n+                [quant.qty * quant.cost for quant in move.reserved_quant_ids])","path":"stock_account_unfuck/models/stock.py","position":24,"original_position":24,"commit_id":"9a89032f1943f5d6fce3e00d84fc6949d211b3bb","original_commit_id":"9a89032f1943f5d6fce3e00d84fc6949d211b3bb","user":{"login":"hbto","id":7598010,"avatar_url":"https://avatars.githubusercontent.com/u/7598010?v=3","gravatar_id":"","url":"https://api.github.com/users/hbto","html_url":"https://github.com/hbto","followers_url":"https://api.github.com/users/hbto/followers","following_url":"https://api.github.com/users/hbto/following{/other_user}","gists_url":"https://api.github.com/users/hbto/gists{/gist_id}","starred_url":"https://api.github.com/users/hbto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hbto/subscriptions","organizations_url":"https://api.github.com/users/hbto/orgs","repos_url":"https://api.github.com/users/hbto/repos","events_url":"https://api.github.com/users/hbto/events{/privacy}","received_events_url":"https://api.github.com/users/hbto/received_events","type":"User","site_admin":false},"body":"@JulioSerna Do you agree on my suggestions?","created_at":"2016-12-28T02:00:47Z","updated_at":"2016-12-28T02:00:47Z","html_url":"https://github.com/Vauxoo/addons-vauxoo/pull/1146#discussion_r93987488","pull_request_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/1146","_links":{"self":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/comments/93987488"},"html":{"href":"https://github.com/Vauxoo/addons-vauxoo/pull/1146#discussion_r93987488"},"pull_request":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/1146"}}},"pull_request":{"url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/1146","id":99499875,"html_url":"https://github.com/Vauxoo/addons-vauxoo/pull/1146","diff_url":"https://github.com/Vauxoo/addons-vauxoo/pull/1146.diff","patch_url":"https://github.com/Vauxoo/addons-vauxoo/pull/1146.patch","issue_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/issues/1146","number":1146,"state":"open","locked":false,"title":"[ADD] stock_account_unfuck: return product supplier/customer to real value of transaction","user":{"login":"ebirbe","id":442938,"avatar_url":"https://avatars.githubusercontent.com/u/442938?v=3","gravatar_id":"","url":"https://api.github.com/users/ebirbe","html_url":"https://github.com/ebirbe","followers_url":"https://api.github.com/users/ebirbe/followers","following_url":"https://api.github.com/users/ebirbe/following{/other_user}","gists_url":"https://api.github.com/users/ebirbe/gists{/gist_id}","starred_url":"https://api.github.com/users/ebirbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebirbe/subscriptions","organizations_url":"https://api.github.com/users/ebirbe/orgs","repos_url":"https://api.github.com/users/ebirbe/repos","events_url":"https://api.github.com/users/ebirbe/events{/privacy}","received_events_url":"https://api.github.com/users/ebirbe/received_events","type":"User","site_admin":false},"body":"This code is a migration of code introduced in https://github.com/Vauxoo/typ/pull/228 applying the coding recommendations made in that PR.","created_at":"2016-12-28T01:52:21Z","updated_at":"2016-12-28T02:00:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f0eb36c66921c6bf692a97aedbba0085b3adda2e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/1146/commits","review_comments_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/1146/comments","review_comment_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/issues/1146/comments","statuses_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/statuses/9a89032f1943f5d6fce3e00d84fc6949d211b3bb","head":{"label":"vauxoo-dev:8.0-stock_account_unfuck-erick","ref":"8.0-stock_account_unfuck-erick","sha":"9a89032f1943f5d6fce3e00d84fc6949d211b3bb","user":{"login":"vauxoo-dev","id":7662790,"avatar_url":"https://avatars.githubusercontent.com/u/7662790?v=3","gravatar_id":"","url":"https://api.github.com/users/vauxoo-dev","html_url":"https://github.com/vauxoo-dev","followers_url":"https://api.github.com/users/vauxoo-dev/followers","following_url":"https://api.github.com/users/vauxoo-dev/following{/other_user}","gists_url":"https://api.github.com/users/vauxoo-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/vauxoo-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vauxoo-dev/subscriptions","organizations_url":"https://api.github.com/users/vauxoo-dev/orgs","repos_url":"https://api.github.com/users/vauxoo-dev/repos","events_url":"https://api.github.com/users/vauxoo-dev/events{/privacy}","received_events_url":"https://api.github.com/users/vauxoo-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":27313681,"name":"addons-vauxoo","full_name":"vauxoo-dev/addons-vauxoo","owner":{"login":"vauxoo-dev","id":7662790,"avatar_url":"https://avatars.githubusercontent.com/u/7662790?v=3","gravatar_id":"","url":"https://api.github.com/users/vauxoo-dev","html_url":"https://github.com/vauxoo-dev","followers_url":"https://api.github.com/users/vauxoo-dev/followers","following_url":"https://api.github.com/users/vauxoo-dev/following{/other_user}","gists_url":"https://api.github.com/users/vauxoo-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/vauxoo-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vauxoo-dev/subscriptions","organizations_url":"https://api.github.com/users/vauxoo-dev/orgs","repos_url":"https://api.github.com/users/vauxoo-dev/repos","events_url":"https://api.github.com/users/vauxoo-dev/events{/privacy}","received_events_url":"https://api.github.com/users/vauxoo-dev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vauxoo-dev/addons-vauxoo","description":null,"fork":true,"url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo","forks_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/forks","keys_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/teams","hooks_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/hooks","issue_events_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/issues/events{/number}","events_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/events","assignees_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/assignees{/user}","branches_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/branches{/branch}","tags_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/tags","blobs_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/statuses/{sha}","languages_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/languages","stargazers_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/stargazers","contributors_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/contributors","subscribers_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/subscribers","subscription_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/subscription","commits_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/issues/comments{/number}","contents_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/contents/{+path}","compare_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/merges","archive_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/downloads","issues_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/issues{/number}","pulls_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/pulls{/number}","milestones_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/milestones{/number}","notifications_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/labels{/name}","releases_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/releases{/id}","deployments_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/deployments","created_at":"2014-11-29T20:09:46Z","updated_at":"2015-02-14T06:28:38Z","pushed_at":"2016-12-28T01:50:31Z","git_url":"git://github.com/vauxoo-dev/addons-vauxoo.git","ssh_url":"git@github.com:vauxoo-dev/addons-vauxoo.git","clone_url":"https://github.com/vauxoo-dev/addons-vauxoo.git","svn_url":"https://github.com/vauxoo-dev/addons-vauxoo","homepage":"","size":98491,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Vauxoo:8.0","ref":"8.0","sha":"f2f28af089d3675525466bd82c5c59e93ac525b6","user":{"login":"Vauxoo","id":5997834,"avatar_url":"https://avatars.githubusercontent.com/u/5997834?v=3","gravatar_id":"","url":"https://api.github.com/users/Vauxoo","html_url":"https://github.com/Vauxoo","followers_url":"https://api.github.com/users/Vauxoo/followers","following_url":"https://api.github.com/users/Vauxoo/following{/other_user}","gists_url":"https://api.github.com/users/Vauxoo/gists{/gist_id}","starred_url":"https://api.github.com/users/Vauxoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vauxoo/subscriptions","organizations_url":"https://api.github.com/users/Vauxoo/orgs","repos_url":"https://api.github.com/users/Vauxoo/repos","events_url":"https://api.github.com/users/Vauxoo/events{/privacy}","received_events_url":"https://api.github.com/users/Vauxoo/received_events","type":"Organization","site_admin":false},"repo":{"id":27311720,"name":"addons-vauxoo","full_name":"Vauxoo/addons-vauxoo","owner":{"login":"Vauxoo","id":5997834,"avatar_url":"https://avatars.githubusercontent.com/u/5997834?v=3","gravatar_id":"","url":"https://api.github.com/users/Vauxoo","html_url":"https://github.com/Vauxoo","followers_url":"https://api.github.com/users/Vauxoo/followers","following_url":"https://api.github.com/users/Vauxoo/following{/other_user}","gists_url":"https://api.github.com/users/Vauxoo/gists{/gist_id}","starred_url":"https://api.github.com/users/Vauxoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vauxoo/subscriptions","organizations_url":"https://api.github.com/users/Vauxoo/orgs","repos_url":"https://api.github.com/users/Vauxoo/repos","events_url":"https://api.github.com/users/Vauxoo/events{/privacy}","received_events_url":"https://api.github.com/users/Vauxoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Vauxoo/addons-vauxoo","description":"All our modules related to developments that solves generic issues on Odoo, or that solve internal problems on Odoo Core, if something is here, maybe it is solving an issue in your company, try it and report what you see.","fork":false,"url":"https://api.github.com/repos/Vauxoo/addons-vauxoo","forks_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/forks","keys_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/teams","hooks_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/hooks","issue_events_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/issues/events{/number}","events_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/events","assignees_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/assignees{/user}","branches_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/branches{/branch}","tags_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/tags","blobs_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/statuses/{sha}","languages_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/languages","stargazers_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/stargazers","contributors_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/contributors","subscribers_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/subscribers","subscription_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/subscription","commits_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/contents/{+path}","compare_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/merges","archive_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/downloads","issues_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/issues{/number}","pulls_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls{/number}","milestones_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/milestones{/number}","notifications_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/labels{/name}","releases_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/releases{/id}","deployments_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/deployments","created_at":"2014-11-29T18:51:03Z","updated_at":"2016-12-20T09:50:51Z","pushed_at":"2016-12-28T01:52:22Z","git_url":"git://github.com/Vauxoo/addons-vauxoo.git","ssh_url":"git@github.com:Vauxoo/addons-vauxoo.git","clone_url":"https://github.com/Vauxoo/addons-vauxoo.git","svn_url":"https://github.com/Vauxoo/addons-vauxoo","homepage":"http://www.vauxoo.com","size":97201,"stargazers_count":65,"watchers_count":65,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":155,"mirror_url":null,"open_issues_count":117,"forks":155,"open_issues":117,"watchers":65,"default_branch":"9.0"}},"_links":{"self":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/1146"},"html":{"href":"https://github.com/Vauxoo/addons-vauxoo/pull/1146"},"issue":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/issues/1146"},"comments":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/issues/1146/comments"},"review_comments":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/1146/comments"},"review_comment":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/1146/commits"},"statuses":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/statuses/9a89032f1943f5d6fce3e00d84fc6949d211b3bb"}}}}
{"actor":{"display_login":"hbto"}}