{"action":"created","comment":{"url":"https://api.github.com/repos/odoomrp/odoomrp-utils/pulls/comments/37538164","id":37538164,"diff_hunk":"@@ -0,0 +1,38 @@\n+\n+# -*- coding: utf-8 -*-\n+##############################################################################\n+# For copyright and license notices, see __openerp__.py file in root directory\n+##############################################################################\n+from openerp import models, fields, api, exceptions, _\n+\n+\n+class AccountInvoice(models.Model):\n+    _inherit = 'account.invoice'\n+\n+    @api.multi\n+    def unlink(self):\n+        for invoice in self:\n+            for line in invoice.invoice_line:\n+                if line.picking_id and line.picking_id.state != 'cancel':\n+                    raise exceptions.Warning(_('Before deleting invoice should'\n+                                               ' cancel the picking: %s')\n+                                             % line.picking_id.name)\n+        return super(AccountInvoice, self).unlink()\n+\n+    @api.multi\n+    def action_cancel(self):\n+        res = super(AccountInvoice, self).action_cancel()\n+        for invoice in self:","path":"account_invoice_line_stock_move_info/models/account_invoice.py","position":25,"original_position":25,"commit_id":"55cbb6ed91deb6941b3bce851a70cdf7b4eb80fd","original_commit_id":"55cbb6ed91deb6941b3bce851a70cdf7b4eb80fd","user":{"login":"pedrobaeza","id":7165771,"avatar_url":"https://avatars.githubusercontent.com/u/7165771?v=3","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},"body":"Se puede quedar en una línea:\r\n`self.mapped('invoice_line.picking_id').write(...`","created_at":"2015-08-20T14:52:20Z","updated_at":"2015-08-20T14:52:20Z","html_url":"https://github.com/odoomrp/odoomrp-utils/pull/83#discussion_r37538164","pull_request_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/pulls/83","_links":{"self":{"href":"https://api.github.com/repos/odoomrp/odoomrp-utils/pulls/comments/37538164"},"html":{"href":"https://github.com/odoomrp/odoomrp-utils/pull/83#discussion_r37538164"},"pull_request":{"href":"https://api.github.com/repos/odoomrp/odoomrp-utils/pulls/83"}}},"pull_request":{"url":"https://api.github.com/repos/odoomrp/odoomrp-utils/pulls/83","id":42928325,"html_url":"https://github.com/odoomrp/odoomrp-utils/pull/83","diff_url":"https://github.com/odoomrp/odoomrp-utils/pull/83.diff","patch_url":"https://github.com/odoomrp/odoomrp-utils/pull/83.patch","issue_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/issues/83","number":83,"state":"open","locked":false,"title":"[IMP] account_invoice_line_stock_move_info: When an invoice is cancel…","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":"…ed, it offers picking as \"To be invoiced\". If an invoice is deleted, It validates that the picking is in the status \"Cancelled\".\r\n\r\nSe ha ampliado este módulo para cubrir el nuevo requerimiento solicitado en la  Reclamación CLM0338-vovler atrás albaranes facturados cuando se elimina o cancela la fra.","created_at":"2015-08-20T13:21:59Z","updated_at":"2015-08-20T14:52:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c743358b00145b4efa936003cce0f2797007882","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/pulls/83/commits","review_comments_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/pulls/83/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/83/comments","statuses_url":"https://api.github.com/repos/odoomrp/odoomrp-utils/statuses/55cbb6ed91deb6941b3bce851a70cdf7b4eb80fd","head":{"label":"alfredoavanzosc:odoomrp-utils-account-invoice_line_stock_move_info","ref":"odoomrp-utils-account-invoice_line_stock_move_info","sha":"55cbb6ed91deb6941b3bce851a70cdf7b4eb80fd","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-08-20T13:19:50Z","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":476,"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":"988ca1ded8fff060e7fb8baa4ab053e384a182f9","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-08-20T13:22:00Z","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":1013,"stargazers_count":16,"watchers_count":16,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":8,"forks":35,"open_issues":8,"watchers":16,"default_branch":"8.0"}},"_links":{"self":{"href":"https://api.github.com/repos/odoomrp/odoomrp-utils/pulls/83"},"html":{"href":"https://github.com/odoomrp/odoomrp-utils/pull/83"},"issue":{"href":"https://api.github.com/repos/odoomrp/odoomrp-utils/issues/83"},"comments":{"href":"https://api.github.com/repos/odoomrp/odoomrp-utils/issues/83/comments"},"review_comments":{"href":"https://api.github.com/repos/odoomrp/odoomrp-utils/pulls/83/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/83/commits"},"statuses":{"href":"https://api.github.com/repos/odoomrp/odoomrp-utils/statuses/55cbb6ed91deb6941b3bce851a70cdf7b4eb80fd"}}}}