{"action":"created","comment":{"url":"https://api.github.com/repos/odoomrp/odoomrp-wip/pulls/comments/22930279","id":22930279,"diff_hunk":"@@ -0,0 +1,36 @@\n+\n+# -*- encoding: utf-8 -*-\n+##############################################################################\n+#\n+#    This program is free software: you can redistribute it and/or modify\n+#    it under the terms of the GNU General Public License as published by\n+#    the Free Software Foundation, either version 3 of the License, or\n+#    (at your option) any later version.\n+#\n+#    This program is distributed in the hope that it will be useful,\n+#    but WITHOUT ANY WARRANTY; without even the implied warranty of\n+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+#    GNU General Public License for more details.\n+#\n+#    You should have received a copy of the GNU General Public License\n+#    along with this program.  If not, see http://www.gnu.org/licenses/.\n+#\n+##############################################################################\n+\n+from openerp import api, models\n+\n+\n+class SaleOrder(models.Model):\n+\n+    _inherit = \"sale.order\"\n+\n+    @api.one\n+    def action_ship_create(self):\n+\n+        res = super(SaleOrder, self).action_ship_create()\n+        for pick in self.picking_ids:\n+            if self.client_order_ref and \\\n+               self.client_order_ref not in pick.origin:\n+                pick.origin_partner_ref = '-'.join([pick.origin,","path":"stock_picking_partner_ref/models/sale_order.py","position":34,"original_position":34,"commit_id":"0088846cf91429d98acf0ebd7a659edd6d75625c","original_commit_id":"0088846cf91429d98acf0ebd7a659edd6d75625c","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":"Y no es más fácil simplemente poner un campo con el `client_order_ref` (related o calculado). ¿Para qué volver a concatenar el origin si ya lo tienes a nivel de picking?","created_at":"2015-01-14T11:13:45Z","updated_at":"2015-01-14T11:13:45Z","html_url":"https://github.com/odoomrp/odoomrp-wip/pull/555#discussion_r22930279","pull_request_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/pulls/555","_links":{"self":{"href":"https://api.github.com/repos/odoomrp/odoomrp-wip/pulls/comments/22930279"},"html":{"href":"https://github.com/odoomrp/odoomrp-wip/pull/555#discussion_r22930279"},"pull_request":{"href":"https://api.github.com/repos/odoomrp/odoomrp-wip/pulls/555"}}},"pull_request":{"url":"https://api.github.com/repos/odoomrp/odoomrp-wip/pulls/555","id":27205222,"html_url":"https://github.com/odoomrp/odoomrp-wip/pull/555","diff_url":"https://github.com/odoomrp/odoomrp-wip/pull/555.diff","patch_url":"https://github.com/odoomrp/odoomrp-wip/pull/555.patch","issue_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/issues/555","number":555,"state":"open","locked":false,"title":"Stock picking partner ref","user":{"login":"mikelarre","id":8257787,"avatar_url":"https://avatars.githubusercontent.com/u/8257787?v=3","gravatar_id":"","url":"https://api.github.com/users/mikelarre","html_url":"https://github.com/mikelarre","followers_url":"https://api.github.com/users/mikelarre/followers","following_url":"https://api.github.com/users/mikelarre/following{/other_user}","gists_url":"https://api.github.com/users/mikelarre/gists{/gist_id}","starred_url":"https://api.github.com/users/mikelarre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikelarre/subscriptions","organizations_url":"https://api.github.com/users/mikelarre/orgs","repos_url":"https://api.github.com/users/mikelarre/repos","events_url":"https://api.github.com/users/mikelarre/events{/privacy}","received_events_url":"https://api.github.com/users/mikelarre/received_events","type":"User","site_admin":false},"body":"stock_picking_partner_ref","created_at":"2015-01-12T16:16:06Z","updated_at":"2015-01-14T11:13:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b345ca6f64514c751b5989bfb2e56509ffeaf920","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/pulls/555/commits","review_comments_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/pulls/555/comments","review_comment_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/pulls/comments/{number}","comments_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/issues/555/comments","statuses_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/statuses/0088846cf91429d98acf0ebd7a659edd6d75625c","head":{"label":"mikelarre:stock_picking_partner_ref","ref":"stock_picking_partner_ref","sha":"0088846cf91429d98acf0ebd7a659edd6d75625c","user":{"login":"mikelarre","id":8257787,"avatar_url":"https://avatars.githubusercontent.com/u/8257787?v=3","gravatar_id":"","url":"https://api.github.com/users/mikelarre","html_url":"https://github.com/mikelarre","followers_url":"https://api.github.com/users/mikelarre/followers","following_url":"https://api.github.com/users/mikelarre/following{/other_user}","gists_url":"https://api.github.com/users/mikelarre/gists{/gist_id}","starred_url":"https://api.github.com/users/mikelarre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikelarre/subscriptions","organizations_url":"https://api.github.com/users/mikelarre/orgs","repos_url":"https://api.github.com/users/mikelarre/repos","events_url":"https://api.github.com/users/mikelarre/events{/privacy}","received_events_url":"https://api.github.com/users/mikelarre/received_events","type":"User","site_admin":false},"repo":{"id":24638889,"name":"odoomrp-wip-1","full_name":"mikelarre/odoomrp-wip-1","owner":{"login":"mikelarre","id":8257787,"avatar_url":"https://avatars.githubusercontent.com/u/8257787?v=3","gravatar_id":"","url":"https://api.github.com/users/mikelarre","html_url":"https://github.com/mikelarre","followers_url":"https://api.github.com/users/mikelarre/followers","following_url":"https://api.github.com/users/mikelarre/following{/other_user}","gists_url":"https://api.github.com/users/mikelarre/gists{/gist_id}","starred_url":"https://api.github.com/users/mikelarre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikelarre/subscriptions","organizations_url":"https://api.github.com/users/mikelarre/orgs","repos_url":"https://api.github.com/users/mikelarre/repos","events_url":"https://api.github.com/users/mikelarre/events{/privacy}","received_events_url":"https://api.github.com/users/mikelarre/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mikelarre/odoomrp-wip-1","description":"WIP of OdooMRP","fork":true,"url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1","forks_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/forks","keys_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/teams","hooks_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/hooks","issue_events_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/issues/events{/number}","events_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/events","assignees_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/assignees{/user}","branches_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/branches{/branch}","tags_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/tags","blobs_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/statuses/{sha}","languages_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/languages","stargazers_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/stargazers","contributors_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/contributors","subscribers_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/subscribers","subscription_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/subscription","commits_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/issues/comments/{number}","contents_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/contents/{+path}","compare_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/merges","archive_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/downloads","issues_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/issues{/number}","pulls_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/pulls{/number}","milestones_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/milestones{/number}","notifications_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/labels{/name}","releases_url":"https://api.github.com/repos/mikelarre/odoomrp-wip-1/releases{/id}","created_at":"2014-09-30T13:23:23Z","updated_at":"2014-09-29T06:45:10Z","pushed_at":"2015-01-12T16:15:10Z","git_url":"git://github.com/mikelarre/odoomrp-wip-1.git","ssh_url":"git@github.com:mikelarre/odoomrp-wip-1.git","clone_url":"https://github.com/mikelarre/odoomrp-wip-1.git","svn_url":"https://github.com/mikelarre/odoomrp-wip-1","homepage":"http://www.odoomrp.com","size":2872,"stargazers_count":0,"watchers_count":0,"language":null,"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":"4debc94e5fe279e1a3b65946015feefab096d300","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":22124768,"name":"odoomrp-wip","full_name":"odoomrp/odoomrp-wip","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-wip","description":"WIP of OdooMRP","fork":false,"url":"https://api.github.com/repos/odoomrp/odoomrp-wip","forks_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/forks","keys_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/teams","hooks_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/hooks","issue_events_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/issues/events{/number}","events_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/events","assignees_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/assignees{/user}","branches_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/branches{/branch}","tags_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/tags","blobs_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/git/refs{/sha}","trees_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/statuses/{sha}","languages_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/languages","stargazers_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/stargazers","contributors_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/contributors","subscribers_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/subscribers","subscription_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/subscription","commits_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/commits{/sha}","git_commits_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/git/commits{/sha}","comments_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/comments{/number}","issue_comment_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/issues/comments/{number}","contents_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/contents/{+path}","compare_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/merges","archive_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/downloads","issues_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/issues{/number}","pulls_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/pulls{/number}","milestones_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/milestones{/number}","notifications_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/labels{/name}","releases_url":"https://api.github.com/repos/odoomrp/odoomrp-wip/releases{/id}","created_at":"2014-07-22T23:29:59Z","updated_at":"2015-01-14T11:02:40Z","pushed_at":"2015-01-14T11:02:39Z","git_url":"git://github.com/odoomrp/odoomrp-wip.git","ssh_url":"git@github.com:odoomrp/odoomrp-wip.git","clone_url":"https://github.com/odoomrp/odoomrp-wip.git","svn_url":"https://github.com/odoomrp/odoomrp-wip","homepage":"http://www.odoomrp.com","size":6327,"stargazers_count":21,"watchers_count":21,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":48,"forks":28,"open_issues":48,"watchers":21,"default_branch":"8.0"}},"_links":{"self":{"href":"https://api.github.com/repos/odoomrp/odoomrp-wip/pulls/555"},"html":{"href":"https://github.com/odoomrp/odoomrp-wip/pull/555"},"issue":{"href":"https://api.github.com/repos/odoomrp/odoomrp-wip/issues/555"},"comments":{"href":"https://api.github.com/repos/odoomrp/odoomrp-wip/issues/555/comments"},"review_comments":{"href":"https://api.github.com/repos/odoomrp/odoomrp-wip/pulls/555/comments"},"review_comment":{"href":"https://api.github.com/repos/odoomrp/odoomrp-wip/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/odoomrp/odoomrp-wip/pulls/555/commits"},"statuses":{"href":"https://api.github.com/repos/odoomrp/odoomrp-wip/statuses/0088846cf91429d98acf0ebd7a659edd6d75625c"}}}}