GitHub PullRequestReviewCommentEvent at 2014-11-27 12:23:25
Repository: sale-workflow
Actor: guewen
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/OCA/sale-workflow/pulls/comments/20993195","id":20993195,"diff_hunk":"@@ -0,0 +1,58 @@\n+# -*- coding: utf-8 -*-\n+##############################################################################\n+#\n+#  licence AGPL version 3 or later\n+#  see licence in __openerp__.py or http://www.gnu.org/licenses/agpl-3.0.txt\n+#  Copyright (C) 2014 Akretion (http://www.akretion.com).\n+#  @author Adrien CHAUSSENDE <adrien.chaussende@akretion.com>\n+#\n+##############################################################################\n+\n+from osv import orm, fields\n+\n+\n+class ProcurementOrder(orm.Model):\n+    _inherit = 'procurement.order'\n+\n+    def create_procurement_purchase_order(self, cr, uid, procurement, po_vals,\n+                                          line_vals, context=None):\n+        if procurement.origin:\n+            sale_order_obj = self.pool.get('sale.order')\n+            sale_order_ids = sale_order_obj.search(\n+                cr, uid, [('name', '=', procurement.origin)]","path":"sale_purchase_link/sale_purchase_link.py","position":22,"original_position":22,"commit_id":"0a10d5f7c923426e80d990339a55b64b0ef25fda","original_commit_id":"0a10d5f7c923426e80d990339a55b64b0ef25fda","user":{"login":"guewen","id":417223,"avatar_url":"https://avatars.githubusercontent.com/u/417223?v=3","gravatar_id":"","url":"https://api.github.com/users/guewen","html_url":"https://github.com/guewen","followers_url":"https://api.github.com/users/guewen/followers","following_url":"https://api.github.com/users/guewen/following{/other_user}","gists_url":"https://api.github.com/users/guewen/gists{/gist_id}","starred_url":"https://api.github.com/users/guewen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guewen/subscriptions","organizations_url":"https://api.github.com/users/guewen/orgs","repos_url":"https://api.github.com/users/guewen/repos","events_url":"https://api.github.com/users/guewen/events{/privacy}","received_events_url":"https://api.github.com/users/guewen/received_events","type":"User","site_admin":false},"body":"Is it the only way to find the sale order? It is very weak...","created_at":"2014-11-27T12:23:25Z","updated_at":"2014-11-27T12:23:25Z","html_url":"https://github.com/OCA/sale-workflow/pull/71#discussion_r20993195","pull_request_url":"https://api.github.com/repos/OCA/sale-workflow/pulls/71","_links":{"self":{"href":"https://api.github.com/repos/OCA/sale-workflow/pulls/comments/20993195"},"html":{"href":"https://github.com/OCA/sale-workflow/pull/71#discussion_r20993195"},"pull_request":{"href":"https://api.github.com/repos/OCA/sale-workflow/pulls/71"}}},"pull_request":{"url":"https://api.github.com/repos/OCA/sale-workflow/pulls/71","id":24851407,"html_url":"https://github.com/OCA/sale-workflow/pull/71","diff_url":"https://github.com/OCA/sale-workflow/pull/71.diff","patch_url":"https://github.com/OCA/sale-workflow/pull/71.patch","issue_url":"https://api.github.com/repos/OCA/sale-workflow/issues/71","number":71,"state":"open","locked":false,"title":"[ADD] Modules sale_cancel_purchase and sale_purchase_link","user":{"login":"achaussende","id":6266416,"avatar_url":"https://avatars.githubusercontent.com/u/6266416?v=3","gravatar_id":"","url":"https://api.github.com/users/achaussende","html_url":"https://github.com/achaussende","followers_url":"https://api.github.com/users/achaussende/followers","following_url":"https://api.github.com/users/achaussende/following{/other_user}","gists_url":"https://api.github.com/users/achaussende/gists{/gist_id}","starred_url":"https://api.github.com/users/achaussende/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achaussende/subscriptions","organizations_url":"https://api.github.com/users/achaussende/orgs","repos_url":"https://api.github.com/users/achaussende/repos","events_url":"https://api.github.com/users/achaussende/events{/privacy}","received_events_url":"https://api.github.com/users/achaussende/received_events","type":"User","site_admin":false},"body":"OpenERP 7.0 Module to cancel a sale order and by the same time, related purchase order lines. That simply delete the lines that are linked to the sale order thanks to sale_purchase_link.\r\n\r\nsale_cancel_purchase depends on sale_purchase_link\r\nThis modules need sale_cancel_picking that you can find on this PR : https://github.com/OCA/sale-workflow/pull/69 ","created_at":"2014-11-21T16:34:14Z","updated_at":"2014-11-27T12:23:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b52c8cc797918f725328e7ef448c58a4e95c217","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OCA/sale-workflow/pulls/71/commits","review_comments_url":"https://api.github.com/repos/OCA/sale-workflow/pulls/71/comments","review_comment_url":"https://api.github.com/repos/OCA/sale-workflow/pulls/comments/{number}","comments_url":"https://api.github.com/repos/OCA/sale-workflow/issues/71/comments","statuses_url":"https://api.github.com/repos/OCA/sale-workflow/statuses/0a10d5f7c923426e80d990339a55b64b0ef25fda","head":{"label":"akretion:7.0-sale-cancel-purchase","ref":"7.0-sale-cancel-purchase","sha":"0a10d5f7c923426e80d990339a55b64b0ef25fda","user":{"login":"akretion","id":1853423,"avatar_url":"https://avatars.githubusercontent.com/u/1853423?v=3","gravatar_id":"","url":"https://api.github.com/users/akretion","html_url":"https://github.com/akretion","followers_url":"https://api.github.com/users/akretion/followers","following_url":"https://api.github.com/users/akretion/following{/other_user}","gists_url":"https://api.github.com/users/akretion/gists{/gist_id}","starred_url":"https://api.github.com/users/akretion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akretion/subscriptions","organizations_url":"https://api.github.com/users/akretion/orgs","repos_url":"https://api.github.com/users/akretion/repos","events_url":"https://api.github.com/users/akretion/events{/privacy}","received_events_url":"https://api.github.com/users/akretion/received_events","type":"Organization","site_admin":false},"repo":{"id":23385877,"name":"sale-workflow","full_name":"akretion/sale-workflow","owner":{"login":"akretion","id":1853423,"avatar_url":"https://avatars.githubusercontent.com/u/1853423?v=3","gravatar_id":"","url":"https://api.github.com/users/akretion","html_url":"https://github.com/akretion","followers_url":"https://api.github.com/users/akretion/followers","following_url":"https://api.github.com/users/akretion/following{/other_user}","gists_url":"https://api.github.com/users/akretion/gists{/gist_id}","starred_url":"https://api.github.com/users/akretion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akretion/subscriptions","organizations_url":"https://api.github.com/users/akretion/orgs","repos_url":"https://api.github.com/users/akretion/repos","events_url":"https://api.github.com/users/akretion/events{/privacy}","received_events_url":"https://api.github.com/users/akretion/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akretion/sale-workflow","description":"","fork":true,"url":"https://api.github.com/repos/akretion/sale-workflow","forks_url":"https://api.github.com/repos/akretion/sale-workflow/forks","keys_url":"https://api.github.com/repos/akretion/sale-workflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akretion/sale-workflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akretion/sale-workflow/teams","hooks_url":"https://api.github.com/repos/akretion/sale-workflow/hooks","issue_events_url":"https://api.github.com/repos/akretion/sale-workflow/issues/events{/number}","events_url":"https://api.github.com/repos/akretion/sale-workflow/events","assignees_url":"https://api.github.com/repos/akretion/sale-workflow/assignees{/user}","branches_url":"https://api.github.com/repos/akretion/sale-workflow/branches{/branch}","tags_url":"https://api.github.com/repos/akretion/sale-workflow/tags","blobs_url":"https://api.github.com/repos/akretion/sale-workflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akretion/sale-workflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akretion/sale-workflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/akretion/sale-workflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akretion/sale-workflow/statuses/{sha}","languages_url":"https://api.github.com/repos/akretion/sale-workflow/languages","stargazers_url":"https://api.github.com/repos/akretion/sale-workflow/stargazers","contributors_url":"https://api.github.com/repos/akretion/sale-workflow/contributors","subscribers_url":"https://api.github.com/repos/akretion/sale-workflow/subscribers","subscription_url":"https://api.github.com/repos/akretion/sale-workflow/subscription","commits_url":"https://api.github.com/repos/akretion/sale-workflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/akretion/sale-workflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/akretion/sale-workflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/akretion/sale-workflow/issues/comments/{number}","contents_url":"https://api.github.com/repos/akretion/sale-workflow/contents/{+path}","compare_url":"https://api.github.com/repos/akretion/sale-workflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akretion/sale-workflow/merges","archive_url":"https://api.github.com/repos/akretion/sale-workflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akretion/sale-workflow/downloads","issues_url":"https://api.github.com/repos/akretion/sale-workflow/issues{/number}","pulls_url":"https://api.github.com/repos/akretion/sale-workflow/pulls{/number}","milestones_url":"https://api.github.com/repos/akretion/sale-workflow/milestones{/number}","notifications_url":"https://api.github.com/repos/akretion/sale-workflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akretion/sale-workflow/labels{/name}","releases_url":"https://api.github.com/repos/akretion/sale-workflow/releases{/id}","created_at":"2014-08-27T10:31:07Z","updated_at":"2014-11-18T11:58:19Z","pushed_at":"2014-11-27T11:53:34Z","git_url":"git://github.com/akretion/sale-workflow.git","ssh_url":"git@github.com:akretion/sale-workflow.git","clone_url":"https://github.com/akretion/sale-workflow.git","svn_url":"https://github.com/akretion/sale-workflow","homepage":null,"size":893,"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":"OCA:7.0","ref":"7.0","sha":"c66cc1f00a6f96fb461c1a3020d69e9597ceaf24","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":20882412,"name":"sale-workflow","full_name":"OCA/sale-workflow","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/sale-workflow","description":"","fork":false,"url":"https://api.github.com/repos/OCA/sale-workflow","forks_url":"https://api.github.com/repos/OCA/sale-workflow/forks","keys_url":"https://api.github.com/repos/OCA/sale-workflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OCA/sale-workflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OCA/sale-workflow/teams","hooks_url":"https://api.github.com/repos/OCA/sale-workflow/hooks","issue_events_url":"https://api.github.com/repos/OCA/sale-workflow/issues/events{/number}","events_url":"https://api.github.com/repos/OCA/sale-workflow/events","assignees_url":"https://api.github.com/repos/OCA/sale-workflow/assignees{/user}","branches_url":"https://api.github.com/repos/OCA/sale-workflow/branches{/branch}","tags_url":"https://api.github.com/repos/OCA/sale-workflow/tags","blobs_url":"https://api.github.com/repos/OCA/sale-workflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OCA/sale-workflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OCA/sale-workflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/OCA/sale-workflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OCA/sale-workflow/statuses/{sha}","languages_url":"https://api.github.com/repos/OCA/sale-workflow/languages","stargazers_url":"https://api.github.com/repos/OCA/sale-workflow/stargazers","contributors_url":"https://api.github.com/repos/OCA/sale-workflow/contributors","subscribers_url":"https://api.github.com/repos/OCA/sale-workflow/subscribers","subscription_url":"https://api.github.com/repos/OCA/sale-workflow/subscription","commits_url":"https://api.github.com/repos/OCA/sale-workflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/OCA/sale-workflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/OCA/sale-workflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/OCA/sale-workflow/issues/comments/{number}","contents_url":"https://api.github.com/repos/OCA/sale-workflow/contents/{+path}","compare_url":"https://api.github.com/repos/OCA/sale-workflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OCA/sale-workflow/merges","archive_url":"https://api.github.com/repos/OCA/sale-workflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OCA/sale-workflow/downloads","issues_url":"https://api.github.com/repos/OCA/sale-workflow/issues{/number}","pulls_url":"https://api.github.com/repos/OCA/sale-workflow/pulls{/number}","milestones_url":"https://api.github.com/repos/OCA/sale-workflow/milestones{/number}","notifications_url":"https://api.github.com/repos/OCA/sale-workflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OCA/sale-workflow/labels{/name}","releases_url":"https://api.github.com/repos/OCA/sale-workflow/releases{/id}","created_at":"2014-06-16T11:26:39Z","updated_at":"2014-11-26T12:34:46Z","pushed_at":"2014-11-26T12:34:46Z","git_url":"git://github.com/OCA/sale-workflow.git","ssh_url":"git@github.com:OCA/sale-workflow.git","clone_url":"https://github.com/OCA/sale-workflow.git","svn_url":"https://github.com/OCA/sale-workflow","homepage":null,"size":2406,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":16,"forks":28,"open_issues":16,"watchers":4,"default_branch":"8.0"}},"_links":{"self":{"href":"https://api.github.com/repos/OCA/sale-workflow/pulls/71"},"html":{"href":"https://github.com/OCA/sale-workflow/pull/71"},"issue":{"href":"https://api.github.com/repos/OCA/sale-workflow/issues/71"},"comments":{"href":"https://api.github.com/repos/OCA/sale-workflow/issues/71/comments"},"review_comments":{"href":"https://api.github.com/repos/OCA/sale-workflow/pulls/71/comments"},"review_comment":{"href":"https://api.github.com/repos/OCA/sale-workflow/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/OCA/sale-workflow/pulls/71/commits"},"statuses":{"href":"https://api.github.com/repos/OCA/sale-workflow/statuses/0a10d5f7c923426e80d990339a55b64b0ef25fda"}}}}