{"action":"created","comment":{"url":"https://api.github.com/repos/odoomrp/odoomrp-utils/pulls/comments/39663202","id":39663202,"diff_hunk":"@@ -60,25 +64,62 @@ def _get_to_date(self):\n         # \"store = False\".\n         for procurement in procurements:\n             if (not procurement.purchase_id or\n-                (procurement.purchase_id and procurement.purchase_id.state ==\n-                 'draft')):\n+                (procurement.purchase_id and procurement.purchase_id.state\n+                 not in ('cancel', 'except_picking', 'except_invoice',\n+                         'done'))):\n                 procurement_qty += procurement.product_qty\n-        self.move_incoming_to_date = move_qty\n-        self.procurement_incoming_to_date = procurement_qty\n+        return procurement_qty\n+\n+    def _calculate_incoming_in_po(self):\n+        purchase_line_obj = self.env['purchase.order.line']\n         cond = [('company_id', '=', self.company.id),\n                 ('product_id', '=', self.product.id),\n-                ('date', '<=', self.scheduled_date),\n-                ('location_id', '=', self.location.id),\n-                ('state', 'not in', ('done', 'cancel'))]\n+                ('date_planned', '<=', self.scheduled_date),","path":"stock_planning/models/stock_planning.py","position":97,"original_position":97,"commit_id":"1caf73dd8ab07ace6a1ea39092aa9150ae018abe","original_commit_id":"1caf73dd8ab07ace6a1ea39092aa9150ae018abe","user":{"login":"anajuaristi","id":186591,"avatar_url":"https://avatars.githubusercontent.com/u/186591?v=3","gravatar_id":"","url":"https://api.github.com/users/anajuaristi","html_url":"https://github.com/anajuaristi","followers_url":"https://api.github.com/users/anajuaristi/followers","following_url":"https://api.github.com/users/anajuaristi/following{/other_user}","gists_url":"https://api.github.com/users/anajuaristi/gists{/gist_id}","starred_url":"https://api.github.com/users/anajuaristi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anajuaristi/subscriptions","organizations_url":"https://api.github.com/users/anajuaristi/orgs","repos_url":"https://api.github.com/users/anajuaristi/repos","events_url":"https://api.github.com/users/anajuaristi/events{/privacy}","received_events_url":"https://api.github.com/users/anajuaristi/received_events","type":"User","site_admin":false},"body":"Lo mismo que en el primer genérico que he definido, pondría en todas las funcines fecha desde y fecha hasta. \r\n```\r\n                ('date_planned', '<=', self.date_to),\r\n                ('date_planned', '>=', self.date_from),\r\n```","created_at":"2015-09-16T17:57:47Z","updated_at":"2015-09-16T17:57:47Z","html_url":"https://github.com/odoomrp/odoomrp-utils/pull/91#discussion_r39663202","pull_request_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/pulls/91","_links":{"self":{"href":"https://api.github.com/repos/odoomrp/odoomrp-utils/pulls/comments/39663202"},"html":{"href":"https://github.com/odoomrp/odoomrp-utils/pull/91#discussion_r39663202"},"pull_request":{"href":"https://api.github.com/repos/odoomrp/odoomrp-utils/pulls/91"}}},"pull_request":{"url":"https://api.github.com/repos/odoomrp/odoomrp-utils/pulls/91","id":44946903,"html_url":"https://github.com/odoomrp/odoomrp-utils/pull/91","diff_url":"https://github.com/odoomrp/odoomrp-utils/pull/91.diff","patch_url":"https://github.com/odoomrp/odoomrp-utils/pull/91.patch","issue_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/issues/91","number":91,"state":"open","locked":false,"title":"[IMP] stock_planning: Show in tree of stock.planning the new fields: …","user":{"login":"alfredoavanzosc","id":8257820,"avatar_url":"https://avatars.githubusercontent.com/u/8257820?v=3","gravatar_id":"","url":"https://api.github.com/users/alfredoavanzosc","html_url":"https://github.com/alfredoavanzosc","followers_url":"https://api.github.com/users/alfredoavanzosc/followers","following_url":"https://api.github.com/users/alfredoavanzosc/following{/other_user}","gists_url":"https://api.github.com/users/alfredoavanzosc/gists{/gist_id}","starred_url":"https://api.github.com/users/alfredoavanzosc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfredoavanzosc/subscriptions","organizations_url":"https://api.github.com/users/alfredoavanzosc/orgs","repos_url":"https://api.github.com/users/alfredoavanzosc/repos","events_url":"https://api.github.com/users/alfredoavanzosc/events{/privacy}","received_events_url":"https://api.github.com/users/alfredoavanzosc/received_events","type":"User","site_admin":false},"body":"…\"Purchases\" and \"Incoming in PO\".\r\n\r\n[ADD] stock_planning_mrp: Show in tree of stock.planning the new fields: \"Incoming in MO\" and \"Procurements\".\r\n\r\nModificado el módulo \"stock_planning\" para mostrar 2 campos nuevos, y nuevo módulo \"stock_planning_mrp\" para mostrar 2 campos nuevos. Estos 2 requerimientos se han solicitado en issue https://github.com/odoomrp/odoomrp-utils/issues/90","created_at":"2015-09-14T15:51:30Z","updated_at":"2015-09-16T17:57:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"312f481b457aa1ae3e1fe6075638c7b953a3085f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/pulls/91/commits","review_comments_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/pulls/91/comments","review_comment_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/pulls/comments{/number}","comments_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/issues/91/comments","statuses_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/statuses/1caf73dd8ab07ace6a1ea39092aa9150ae018abe","head":{"label":"alfredoavanzosc:odoomrp-utils-stock_planning","ref":"odoomrp-utils-stock_planning","sha":"1caf73dd8ab07ace6a1ea39092aa9150ae018abe","user":{"login":"alfredoavanzosc","id":8257820,"avatar_url":"https://avatars.githubusercontent.com/u/8257820?v=3","gravatar_id":"","url":"https://api.github.com/users/alfredoavanzosc","html_url":"https://github.com/alfredoavanzosc","followers_url":"https://api.github.com/users/alfredoavanzosc/followers","following_url":"https://api.github.com/users/alfredoavanzosc/following{/other_user}","gists_url":"https://api.github.com/users/alfredoavanzosc/gists{/gist_id}","starred_url":"https://api.github.com/users/alfredoavanzosc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfredoavanzosc/subscriptions","organizations_url":"https://api.github.com/users/alfredoavanzosc/orgs","repos_url":"https://api.github.com/users/alfredoavanzosc/repos","events_url":"https://api.github.com/users/alfredoavanzosc/events{/privacy}","received_events_url":"https://api.github.com/users/alfredoavanzosc/received_events","type":"User","site_admin":false},"repo":{"id":29463626,"name":"odoomrp-utils","full_name":"alfredoavanzosc/odoomrp-utils","owner":{"login":"alfredoavanzosc","id":8257820,"avatar_url":"https://avatars.githubusercontent.com/u/8257820?v=3","gravatar_id":"","url":"https://api.github.com/users/alfredoavanzosc","html_url":"https://github.com/alfredoavanzosc","followers_url":"https://api.github.com/users/alfredoavanzosc/followers","following_url":"https://api.github.com/users/alfredoavanzosc/following{/other_user}","gists_url":"https://api.github.com/users/alfredoavanzosc/gists{/gist_id}","starred_url":"https://api.github.com/users/alfredoavanzosc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfredoavanzosc/subscriptions","organizations_url":"https://api.github.com/users/alfredoavanzosc/orgs","repos_url":"https://api.github.com/users/alfredoavanzosc/repos","events_url":"https://api.github.com/users/alfredoavanzosc/events{/privacy}","received_events_url":"https://api.github.com/users/alfredoavanzosc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alfredoavanzosc/odoomrp-utils","description":"OdooMRP utilities","fork":true,"url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils","forks_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/forks","keys_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/teams","hooks_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/hooks","issue_events_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/issues/events{/number}","events_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/events","assignees_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/assignees{/user}","branches_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/branches{/branch}","tags_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/tags","blobs_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/git/refs{/sha}","trees_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/statuses/{sha}","languages_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/languages","stargazers_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/stargazers","contributors_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/contributors","subscribers_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/subscribers","subscription_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/subscription","commits_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/commits{/sha}","git_commits_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/git/commits{/sha}","comments_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/comments{/number}","issue_comment_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/issues/comments{/number}","contents_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/contents/{+path}","compare_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/merges","archive_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/downloads","issues_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/issues{/number}","pulls_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/pulls{/number}","milestones_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/milestones{/number}","notifications_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/labels{/name}","releases_url":"https://api.github.com/repos/alfredoavanzosc/odoomrp-utils/releases{/id}","created_at":"2015-01-19T09:36:44Z","updated_at":"2015-01-19T09:36:45Z","pushed_at":"2015-09-16T06:57:02Z","git_url":"git://github.com/alfredoavanzosc/odoomrp-utils.git","ssh_url":"git@github.com:alfredoavanzosc/odoomrp-utils.git","clone_url":"https://github.com/alfredoavanzosc/odoomrp-utils.git","svn_url":"https://github.com/alfredoavanzosc/odoomrp-utils","homepage":"","size":498,"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":"odoomrp:8.0","ref":"8.0","sha":"e731190a5873c71f431efda7cdb3febfcf36854b","user":{"login":"odoomrp","id":7858947,"avatar_url":"https://avatars.githubusercontent.com/u/7858947?v=3","gravatar_id":"","url":"https://api.github.com/users/odoomrp","html_url":"https://github.com/odoomrp","followers_url":"https://api.github.com/users/odoomrp/followers","following_url":"https://api.github.com/users/odoomrp/following{/other_user}","gists_url":"https://api.github.com/users/odoomrp/gists{/gist_id}","starred_url":"https://api.github.com/users/odoomrp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odoomrp/subscriptions","organizations_url":"https://api.github.com/users/odoomrp/orgs","repos_url":"https://api.github.com/users/odoomrp/repos","events_url":"https://api.github.com/users/odoomrp/events{/privacy}","received_events_url":"https://api.github.com/users/odoomrp/received_events","type":"Organization","site_admin":false},"repo":{"id":27420524,"name":"odoomrp-utils","full_name":"odoomrp/odoomrp-utils","owner":{"login":"odoomrp","id":7858947,"avatar_url":"https://avatars.githubusercontent.com/u/7858947?v=3","gravatar_id":"","url":"https://api.github.com/users/odoomrp","html_url":"https://github.com/odoomrp","followers_url":"https://api.github.com/users/odoomrp/followers","following_url":"https://api.github.com/users/odoomrp/following{/other_user}","gists_url":"https://api.github.com/users/odoomrp/gists{/gist_id}","starred_url":"https://api.github.com/users/odoomrp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odoomrp/subscriptions","organizations_url":"https://api.github.com/users/odoomrp/orgs","repos_url":"https://api.github.com/users/odoomrp/repos","events_url":"https://api.github.com/users/odoomrp/events{/privacy}","received_events_url":"https://api.github.com/users/odoomrp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/odoomrp/odoomrp-utils","description":"OdooMRP utilities","fork":false,"url":"https://api.github.com/repos/odoomrp/odoomrp-utils","forks_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/forks","keys_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/teams","hooks_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/hooks","issue_events_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/issues/events{/number}","events_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/events","assignees_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/assignees{/user}","branches_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/branches{/branch}","tags_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/tags","blobs_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/git/refs{/sha}","trees_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/statuses/{sha}","languages_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/languages","stargazers_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/stargazers","contributors_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/contributors","subscribers_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/subscribers","subscription_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/subscription","commits_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/commits{/sha}","git_commits_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/git/commits{/sha}","comments_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/comments{/number}","issue_comment_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/issues/comments{/number}","contents_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/contents/{+path}","compare_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/merges","archive_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/downloads","issues_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/issues{/number}","pulls_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/pulls{/number}","milestones_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/milestones{/number}","notifications_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/labels{/name}","releases_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/releases{/id}","created_at":"2014-12-02T07:27:11Z","updated_at":"2015-08-08T15:20:41Z","pushed_at":"2015-09-16T06:57:03Z","git_url":"git://github.com/odoomrp/odoomrp-utils.git","ssh_url":"git@github.com:odoomrp/odoomrp-utils.git","clone_url":"https://github.com/odoomrp/odoomrp-utils.git","svn_url":"https://github.com/odoomrp/odoomrp-utils","homepage":"","size":1069,"stargazers_count":16,"watchers_count":16,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":10,"forks":39,"open_issues":10,"watchers":16,"default_branch":"8.0"}},"_links":{"self":{"href":"https://api.github.com/repos/odoomrp/odoomrp-utils/pulls/91"},"html":{"href":"https://github.com/odoomrp/odoomrp-utils/pull/91"},"issue":{"href":"https://api.github.com/repos/odoomrp/odoomrp-utils/issues/91"},"comments":{"href":"https://api.github.com/repos/odoomrp/odoomrp-utils/issues/91/comments"},"review_comments":{"href":"https://api.github.com/repos/odoomrp/odoomrp-utils/pulls/91/comments"},"review_comment":{"href":"https://api.github.com/repos/odoomrp/odoomrp-utils/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/odoomrp/odoomrp-utils/pulls/91/commits"},"statuses":{"href":"https://api.github.com/repos/odoomrp/odoomrp-utils/statuses/1caf73dd8ab07ace6a1ea39092aa9150ae018abe"}}}}