{"action":"created","comment":{"url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/pulls/comments/176681766","pull_request_review_id":106417859,"id":176681766,"diff_hunk":"@@ -0,0 +1,109 @@\n+# -*- coding: utf-8 -*-\n+# Copyright 2017-18 Eficent Business and IT Consulting Services S.L.\n+#   (http://www.eficent.com)\n+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).\n+\n+import logging\n+\n+from odoo import api, fields, models, tools\n+from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT\n+from datetime import datetime\n+_logger = logging.getLogger(__name__)\n+\n+try:\n+    from numpy import mean\n+    NUMPY_PATH = tools.find_in_path('numpy')\n+except (ImportError, IOError) as err:\n+    _logger.debug(err)\n+\n+\n+class StockLocation(models.Model):\n+    _inherit = 'stock.location'\n+\n+    @api.multi\n+    def _compute_loc_accuracy(self):\n+        for rec in self:\n+            history = self.env['stock.inventory'].search([","path":"stock_cycle_count/models/stock_location.py","position":26,"original_position":26,"commit_id":"0d416881a3b474aa56f3cd10fc5b5675795cd4f9","original_commit_id":"0d416881a3b474aa56f3cd10fc5b5675795cd4f9","user":{"login":"rousseldenis","id":19529533,"avatar_url":"https://avatars2.githubusercontent.com/u/19529533?v=4","gravatar_id":"","url":"https://api.github.com/users/rousseldenis","html_url":"https://github.com/rousseldenis","followers_url":"https://api.github.com/users/rousseldenis/followers","following_url":"https://api.github.com/users/rousseldenis/following{/other_user}","gists_url":"https://api.github.com/users/rousseldenis/gists{/gist_id}","starred_url":"https://api.github.com/users/rousseldenis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rousseldenis/subscriptions","organizations_url":"https://api.github.com/users/rousseldenis/orgs","repos_url":"https://api.github.com/users/rousseldenis/repos","events_url":"https://api.github.com/users/rousseldenis/events{/privacy}","received_events_url":"https://api.github.com/users/rousseldenis/received_events","type":"User","site_admin":false},"body":"Maybe it could be interesting to have an inventory history field on locations ?","created_at":"2018-03-23T09:43:26Z","updated_at":"2018-03-23T09:53:45Z","html_url":"https://github.com/OCA/stock-logistics-warehouse/pull/332#discussion_r176681766","pull_request_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/pulls/332","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/OCA/stock-logistics-warehouse/pulls/comments/176681766"},"html":{"href":"https://github.com/OCA/stock-logistics-warehouse/pull/332#discussion_r176681766"},"pull_request":{"href":"https://api.github.com/repos/OCA/stock-logistics-warehouse/pulls/332"}}},"pull_request":{"url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/pulls/332","id":137424553,"html_url":"https://github.com/OCA/stock-logistics-warehouse/pull/332","diff_url":"https://github.com/OCA/stock-logistics-warehouse/pull/332.diff","patch_url":"https://github.com/OCA/stock-logistics-warehouse/pull/332.patch","issue_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/issues/332","number":332,"state":"open","locked":false,"title":"[10.0][MIG] stock_cycle_count","user":{"login":"lreficent","id":23449160,"avatar_url":"https://avatars2.githubusercontent.com/u/23449160?v=4","gravatar_id":"","url":"https://api.github.com/users/lreficent","html_url":"https://github.com/lreficent","followers_url":"https://api.github.com/users/lreficent/followers","following_url":"https://api.github.com/users/lreficent/following{/other_user}","gists_url":"https://api.github.com/users/lreficent/gists{/gist_id}","starred_url":"https://api.github.com/users/lreficent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lreficent/subscriptions","organizations_url":"https://api.github.com/users/lreficent/orgs","repos_url":"https://api.github.com/users/lreficent/repos","events_url":"https://api.github.com/users/lreficent/events{/privacy}","received_events_url":"https://api.github.com/users/lreficent/received_events","type":"User","site_admin":false},"body":"Migration from v9 to v10.\r\n\r\nDepends on:\r\n* [x] : https://github.com/OCA/stock-logistics-warehouse/pull/319\r\n* [x] : https://github.com/OCA/stock-logistics-warehouse/pull/318\r\n* [x] : https://github.com/OCA/stock-logistics-warehouse/pull/330","created_at":"2017-08-24T10:48:34Z","updated_at":"2018-03-23T09:53:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3eddcd9a809d3fb2a633ffdefd34ae6b11ecccd8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":121861129,"url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/labels/needs%20review","name":"needs review","color":"fbca04","default":false}],"milestone":{"url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/milestones/5","html_url":"https://github.com/OCA/stock-logistics-warehouse/milestone/5","labels_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/milestones/5/labels","id":2052394,"number":5,"title":"10.0","description":null,"creator":{"login":"pedrobaeza","id":7165771,"avatar_url":"https://avatars2.githubusercontent.com/u/7165771?v=4","gravatar_id":"","url":"https://api.github.com/users/pedrobaeza","html_url":"https://github.com/pedrobaeza","followers_url":"https://api.github.com/users/pedrobaeza/followers","following_url":"https://api.github.com/users/pedrobaeza/following{/other_user}","gists_url":"https://api.github.com/users/pedrobaeza/gists{/gist_id}","starred_url":"https://api.github.com/users/pedrobaeza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedrobaeza/subscriptions","organizations_url":"https://api.github.com/users/pedrobaeza/orgs","repos_url":"https://api.github.com/users/pedrobaeza/repos","events_url":"https://api.github.com/users/pedrobaeza/events{/privacy}","received_events_url":"https://api.github.com/users/pedrobaeza/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":11,"state":"open","created_at":"2016-10-06T14:09:45Z","updated_at":"2018-03-17T11:28:27Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/pulls/332/commits","review_comments_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/pulls/332/comments","review_comment_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/issues/332/comments","statuses_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/statuses/0d416881a3b474aa56f3cd10fc5b5675795cd4f9","head":{"label":"Eficent:10.0-mig-stock_cycle_count","ref":"10.0-mig-stock_cycle_count","sha":"0d416881a3b474aa56f3cd10fc5b5675795cd4f9","user":{"login":"Eficent","id":7718403,"avatar_url":"https://avatars0.githubusercontent.com/u/7718403?v=4","gravatar_id":"","url":"https://api.github.com/users/Eficent","html_url":"https://github.com/Eficent","followers_url":"https://api.github.com/users/Eficent/followers","following_url":"https://api.github.com/users/Eficent/following{/other_user}","gists_url":"https://api.github.com/users/Eficent/gists{/gist_id}","starred_url":"https://api.github.com/users/Eficent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eficent/subscriptions","organizations_url":"https://api.github.com/users/Eficent/orgs","repos_url":"https://api.github.com/users/Eficent/repos","events_url":"https://api.github.com/users/Eficent/events{/privacy}","received_events_url":"https://api.github.com/users/Eficent/received_events","type":"Organization","site_admin":false},"repo":{"id":46787116,"name":"stock-logistics-warehouse","full_name":"Eficent/stock-logistics-warehouse","owner":{"login":"Eficent","id":7718403,"avatar_url":"https://avatars0.githubusercontent.com/u/7718403?v=4","gravatar_id":"","url":"https://api.github.com/users/Eficent","html_url":"https://github.com/Eficent","followers_url":"https://api.github.com/users/Eficent/followers","following_url":"https://api.github.com/users/Eficent/following{/other_user}","gists_url":"https://api.github.com/users/Eficent/gists{/gist_id}","starred_url":"https://api.github.com/users/Eficent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eficent/subscriptions","organizations_url":"https://api.github.com/users/Eficent/orgs","repos_url":"https://api.github.com/users/Eficent/repos","events_url":"https://api.github.com/users/Eficent/events{/privacy}","received_events_url":"https://api.github.com/users/Eficent/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Eficent/stock-logistics-warehouse","description":"Odoo Warehouse Management Addons","fork":true,"url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse","forks_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/forks","keys_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/teams","hooks_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/hooks","issue_events_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/issues/events{/number}","events_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/events","assignees_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/assignees{/user}","branches_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/branches{/branch}","tags_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/tags","blobs_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/git/refs{/sha}","trees_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/statuses/{sha}","languages_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/languages","stargazers_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/stargazers","contributors_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/contributors","subscribers_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/subscribers","subscription_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/subscription","commits_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/commits{/sha}","git_commits_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/git/commits{/sha}","comments_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/comments{/number}","issue_comment_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/issues/comments{/number}","contents_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/contents/{+path}","compare_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/merges","archive_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/downloads","issues_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/issues{/number}","pulls_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/pulls{/number}","milestones_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/milestones{/number}","notifications_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/labels{/name}","releases_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/releases{/id}","deployments_url":"https://api.github.com/repos/Eficent/stock-logistics-warehouse/deployments","created_at":"2015-11-24T11:23:19Z","updated_at":"2017-01-23T11:52:23Z","pushed_at":"2018-03-20T12:01:36Z","git_url":"git://github.com/Eficent/stock-logistics-warehouse.git","ssh_url":"git@github.com:Eficent/stock-logistics-warehouse.git","clone_url":"https://github.com/Eficent/stock-logistics-warehouse.git","svn_url":"https://github.com/Eficent/stock-logistics-warehouse","homepage":"","size":5204,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":2,"open_issues":2,"watchers":1,"default_branch":"9.0"}},"base":{"label":"OCA:10.0","ref":"10.0","sha":"a104158263393e24744be9014a85d46f4c1eed37","user":{"login":"OCA","id":7600578,"avatar_url":"https://avatars1.githubusercontent.com/u/7600578?v=4","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":20891354,"name":"stock-logistics-warehouse","full_name":"OCA/stock-logistics-warehouse","owner":{"login":"OCA","id":7600578,"avatar_url":"https://avatars1.githubusercontent.com/u/7600578?v=4","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/stock-logistics-warehouse","description":"Odoo Warehouse Management Addons","fork":false,"url":"https://api.github.com/repos/OCA/stock-logistics-warehouse","forks_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/forks","keys_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/teams","hooks_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/hooks","issue_events_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/issues/events{/number}","events_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/events","assignees_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/assignees{/user}","branches_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/branches{/branch}","tags_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/tags","blobs_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/git/refs{/sha}","trees_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/statuses/{sha}","languages_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/languages","stargazers_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/stargazers","contributors_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/contributors","subscribers_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/subscribers","subscription_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/subscription","commits_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/commits{/sha}","git_commits_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/git/commits{/sha}","comments_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/comments{/number}","issue_comment_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/issues/comments{/number}","contents_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/contents/{+path}","compare_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/merges","archive_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/downloads","issues_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/issues{/number}","pulls_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/pulls{/number}","milestones_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/milestones{/number}","notifications_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/labels{/name}","releases_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/releases{/id}","deployments_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/deployments","created_at":"2014-06-16T16:08:03Z","updated_at":"2018-03-22T08:42:10Z","pushed_at":"2018-03-23T09:38:43Z","git_url":"git://github.com/OCA/stock-logistics-warehouse.git","ssh_url":"git@github.com:OCA/stock-logistics-warehouse.git","clone_url":"https://github.com/OCA/stock-logistics-warehouse.git","svn_url":"https://github.com/OCA/stock-logistics-warehouse","homepage":"","size":5953,"stargazers_count":63,"watchers_count":63,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":224,"mirror_url":null,"archived":false,"open_issues_count":69,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":224,"open_issues":69,"watchers":63,"default_branch":"11.0"}},"_links":{"self":{"href":"https://api.github.com/repos/OCA/stock-logistics-warehouse/pulls/332"},"html":{"href":"https://github.com/OCA/stock-logistics-warehouse/pull/332"},"issue":{"href":"https://api.github.com/repos/OCA/stock-logistics-warehouse/issues/332"},"comments":{"href":"https://api.github.com/repos/OCA/stock-logistics-warehouse/issues/332/comments"},"review_comments":{"href":"https://api.github.com/repos/OCA/stock-logistics-warehouse/pulls/332/comments"},"review_comment":{"href":"https://api.github.com/repos/OCA/stock-logistics-warehouse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OCA/stock-logistics-warehouse/pulls/332/commits"},"statuses":{"href":"https://api.github.com/repos/OCA/stock-logistics-warehouse/statuses/0d416881a3b474aa56f3cd10fc5b5675795cd4f9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"rousseldenis"}}