{"action":"created","comment":{"url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/pulls/comments/56601065","id":56601065,"diff_hunk":"@@ -0,0 +1,121 @@\n+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg\n+   :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html\n+   :alt: License: AGPL-3\n+\n+================================================\n+Hierarchical structure for Inventory adjustments\n+================================================\n+\n+This module adds a parent-child relationship between inventory adjustments, to\n+help users manage complex warehouses.\n+Using several inventories, you can distribute the counting to several persons\n+and still keep a clear overview of global inventory's status.\n+\n+The main inventory will be for a general Location, and the sub-inventories\n+should contain sub-Locations.\n+\n+Odoo will make sure the status of the Inventory and it's Sub-Inventories are\n+consistent:\n+\n+* sub-inventories will be prepared automatically when you prepare the main\n+  inventory\n+* you must finish the sub-inventories before you can finish the main inventory\n+* canceling a sub-inventory is only possible is the parent inventories are","path":"stock_inventory_hierarchical/README.rst","position":23,"original_position":23,"commit_id":"138855e6294a96d39f0bfd3e164b078671539e7b","original_commit_id":"138855e6294a96d39f0bfd3e164b078671539e7b","user":{"login":"elicoidal","id":7600613,"avatar_url":"https://avatars.githubusercontent.com/u/7600613?v=3","gravatar_id":"","url":"https://api.github.com/users/elicoidal","html_url":"https://github.com/elicoidal","followers_url":"https://api.github.com/users/elicoidal/followers","following_url":"https://api.github.com/users/elicoidal/following{/other_user}","gists_url":"https://api.github.com/users/elicoidal/gists{/gist_id}","starred_url":"https://api.github.com/users/elicoidal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elicoidal/subscriptions","organizations_url":"https://api.github.com/users/elicoidal/orgs","repos_url":"https://api.github.com/users/elicoidal/repos","events_url":"https://api.github.com/users/elicoidal/events{/privacy}","received_events_url":"https://api.github.com/users/elicoidal/received_events","type":"User","site_admin":false},"body":"should not it be the other way around?\r\nyou can only cancel a parent inventory if all sub-inventories are cancelled?","created_at":"2016-03-18T00:57:26Z","updated_at":"2016-03-18T00:57:26Z","html_url":"https://github.com/OCA/stock-logistics-warehouse/pull/139#discussion_r56601065","pull_request_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/pulls/139","_links":{"self":{"href":"https://api.github.com/repos/OCA/stock-logistics-warehouse/pulls/comments/56601065"},"html":{"href":"https://github.com/OCA/stock-logistics-warehouse/pull/139#discussion_r56601065"},"pull_request":{"href":"https://api.github.com/repos/OCA/stock-logistics-warehouse/pulls/139"}}},"pull_request":{"url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/pulls/139","id":63205005,"html_url":"https://github.com/OCA/stock-logistics-warehouse/pull/139","diff_url":"https://github.com/OCA/stock-logistics-warehouse/pull/139.diff","patch_url":"https://github.com/OCA/stock-logistics-warehouse/pull/139.patch","issue_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/issues/139","number":139,"state":"open","locked":false,"title":"Migrate stock_inventory_hierarchical to v8","user":{"login":"clonedagain","id":391953,"avatar_url":"https://avatars.githubusercontent.com/u/391953?v=3","gravatar_id":"","url":"https://api.github.com/users/clonedagain","html_url":"https://github.com/clonedagain","followers_url":"https://api.github.com/users/clonedagain/followers","following_url":"https://api.github.com/users/clonedagain/following{/other_user}","gists_url":"https://api.github.com/users/clonedagain/gists{/gist_id}","starred_url":"https://api.github.com/users/clonedagain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clonedagain/subscriptions","organizations_url":"https://api.github.com/users/clonedagain/orgs","repos_url":"https://api.github.com/users/clonedagain/repos","events_url":"https://api.github.com/users/clonedagain/events{/privacy}","received_events_url":"https://api.github.com/users/clonedagain/received_events","type":"User","site_admin":false},"body":"Migrate stock_inventory_hierarchical to v8\r\n\r\nPrerequisites\r\n==========\r\nFor more readability during the review, please merge https://github.com/OCA/stock-logistics-warehouse/pull/137 before this PR.\r\n\r\nMigration/adaptation to Odoo v8\r\n===============================\r\nUse `stock.inventory.location_id` (now it's standard)\r\nMove the \"generate inventories\" wizard to stock_inventory_hierarchical (drop the field exhaustive)\r\nUse v8 API\r\nDrop the exception `HierarchicalInventoryException` in favor of the new standard exception `ValidationError`\r\nPlace the sub-inventories outside the notebook on the main inventory form (the notebook is hidden on draft inventories)\r\nUpdate the translation template and translation into French.\r\n\r\nImprovements\r\n============\r\nWhen creating a hierarchy of inventories using the wizard with the \"views only\" feature, make sure it matches the view hierarchy. In v7 it would ignore views which were inside internal locations, but this is more common in v8 because a location can't be the source or destination of any stock moves.\r\nAutomatically open the sub-inventories when the main inventory is opened. This avoids having to compute useless lines for the main inventory and then re-computing the same lines when opening the sub-inventories\r\nAutomatically cancel (set to draft) the sub-inventories when the main inventory is canceled.\r\nAdd warnings when clicking the buttons \"Start inventory\" and \"Cancel inventory\". The two changes above are a bit invasive, so we must make sure users know what's going to happen.\r\nSpeed improvement: defer the computation of `parent_left`/`parent_right` to the end of the wizard.\r\nAdd documentation (cf README.rst)\r\n\r\nCoding standards\r\n================\r\nClearly define (and strictly enforce) the consitency of the states of the inventories with their sub-inventories.\r\nRewrite the tests in API v8, improve the coverage. Drop the demo data in favor of a much larger test dataset, automatically generated during the tests.\r\nAdopt the newest OCA standards for licences, README\r\nBump version to 2.0\r\nUpdate the screen captures","created_at":"2016-03-17T10:59:32Z","updated_at":"2016-03-18T00:57:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab4c31af40c3a1e98274020fa19cc929387d8b6d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/pulls/139/commits","review_comments_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/pulls/139/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/139/comments","statuses_url":"https://api.github.com/repos/OCA/stock-logistics-warehouse/statuses/138855e6294a96d39f0bfd3e164b078671539e7b","head":{"label":"numerigraphe:8.0-migrate-advanced-inventory","ref":"8.0-migrate-advanced-inventory","sha":"138855e6294a96d39f0bfd3e164b078671539e7b","user":{"login":"numerigraphe","id":7725011,"avatar_url":"https://avatars.githubusercontent.com/u/7725011?v=3","gravatar_id":"","url":"https://api.github.com/users/numerigraphe","html_url":"https://github.com/numerigraphe","followers_url":"https://api.github.com/users/numerigraphe/followers","following_url":"https://api.github.com/users/numerigraphe/following{/other_user}","gists_url":"https://api.github.com/users/numerigraphe/gists{/gist_id}","starred_url":"https://api.github.com/users/numerigraphe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numerigraphe/subscriptions","organizations_url":"https://api.github.com/users/numerigraphe/orgs","repos_url":"https://api.github.com/users/numerigraphe/repos","events_url":"https://api.github.com/users/numerigraphe/events{/privacy}","received_events_url":"https://api.github.com/users/numerigraphe/received_events","type":"Organization","site_admin":false},"repo":{"id":22374522,"name":"stock-logistics-warehouse","full_name":"numerigraphe/stock-logistics-warehouse","owner":{"login":"numerigraphe","id":7725011,"avatar_url":"https://avatars.githubusercontent.com/u/7725011?v=3","gravatar_id":"","url":"https://api.github.com/users/numerigraphe","html_url":"https://github.com/numerigraphe","followers_url":"https://api.github.com/users/numerigraphe/followers","following_url":"https://api.github.com/users/numerigraphe/following{/other_user}","gists_url":"https://api.github.com/users/numerigraphe/gists{/gist_id}","starred_url":"https://api.github.com/users/numerigraphe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numerigraphe/subscriptions","organizations_url":"https://api.github.com/users/numerigraphe/orgs","repos_url":"https://api.github.com/users/numerigraphe/repos","events_url":"https://api.github.com/users/numerigraphe/events{/privacy}","received_events_url":"https://api.github.com/users/numerigraphe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/numerigraphe/stock-logistics-warehouse","description":"","fork":true,"url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse","forks_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/forks","keys_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/teams","hooks_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/hooks","issue_events_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/issues/events{/number}","events_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/events","assignees_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/assignees{/user}","branches_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/branches{/branch}","tags_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/tags","blobs_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/git/refs{/sha}","trees_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/statuses/{sha}","languages_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/languages","stargazers_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/stargazers","contributors_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/contributors","subscribers_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/subscribers","subscription_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/subscription","commits_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/commits{/sha}","git_commits_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/git/commits{/sha}","comments_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/comments{/number}","issue_comment_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/issues/comments{/number}","contents_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/contents/{+path}","compare_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/merges","archive_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/downloads","issues_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/issues{/number}","pulls_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/pulls{/number}","milestones_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/milestones{/number}","notifications_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/labels{/name}","releases_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/releases{/id}","deployments_url":"https://api.github.com/repos/numerigraphe/stock-logistics-warehouse/deployments","created_at":"2014-07-29T09:24:12Z","updated_at":"2015-06-21T11:43:25Z","pushed_at":"2016-03-17T15:48:18Z","git_url":"git://github.com/numerigraphe/stock-logistics-warehouse.git","ssh_url":"git@github.com:numerigraphe/stock-logistics-warehouse.git","clone_url":"https://github.com/numerigraphe/stock-logistics-warehouse.git","svn_url":"https://github.com/numerigraphe/stock-logistics-warehouse","homepage":null,"size":2095,"stargazers_count":2,"watchers_count":2,"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":2,"default_branch":"8.0"}},"base":{"label":"OCA:8.0","ref":"8.0","sha":"e0bc3a26edb9a4c799f7b31a56d0ac1d5aed9efc","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":20891354,"name":"stock-logistics-warehouse","full_name":"OCA/stock-logistics-warehouse","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/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":"2016-02-17T12:33:03Z","pushed_at":"2016-03-17T15:48:20Z","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":2030,"stargazers_count":24,"watchers_count":24,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":95,"mirror_url":null,"open_issues_count":50,"forks":95,"open_issues":50,"watchers":24,"default_branch":"9.0"}},"_links":{"self":{"href":"https://api.github.com/repos/OCA/stock-logistics-warehouse/pulls/139"},"html":{"href":"https://github.com/OCA/stock-logistics-warehouse/pull/139"},"issue":{"href":"https://api.github.com/repos/OCA/stock-logistics-warehouse/issues/139"},"comments":{"href":"https://api.github.com/repos/OCA/stock-logistics-warehouse/issues/139/comments"},"review_comments":{"href":"https://api.github.com/repos/OCA/stock-logistics-warehouse/pulls/139/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/139/commits"},"statuses":{"href":"https://api.github.com/repos/OCA/stock-logistics-warehouse/statuses/138855e6294a96d39f0bfd3e164b078671539e7b"}}}}