{"action":"created","comment":{"url":"https://api.github.com/repos/ecosoft-odoo/sqp/pulls/comments/103632408","pull_request_review_id":24423135,"id":103632408,"diff_hunk":"@@ -0,0 +1,193 @@\n+# -*- coding: utf-8 -*-\n+##############################################################################\n+#\n+#    OpenERP, Open Source Management Solution\n+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).\n+#\n+#    This program is free software: you can redistribute it and/or modify\n+#    it under the terms of the GNU Affero General Public License as\n+#    published by the Free Software Foundation, either version 3 of the\n+#    License, or (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 Affero General Public License for more details.\n+#\n+#    You should have received a copy of the GNU Affero General Public License\n+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+#\n+##############################################################################\n+\n+from openerp.osv import fields, osv\n+\n+class stock_picking(osv.osv):\n+\n+    _inherit = 'stock.picking'\n+\n+    _columns = {\n+        'boi_type': fields.selection([\n+            ('NONBOI', 'NONBOI'),\n+            ('BOI', 'BOI'),\n+            ], 'BOI Type', required=True, select=True,\n+        ),\n+        'boi_number_id': fields.many2one('boi.certificate', 'BOI Number'),\n+    }\n+\n+    _defaults = {\n+        'boi_type': 'NONBOI',\n+    }\n+\n+    def do_partial(self, cr, uid, ids, partial_datas, context=None):\n+        if context is None:\n+            context = {}\n+        res = super(stock_picking, self).do_partial(cr, uid, ids, partial_datas, context=None)\n+        return res\n+\n+stock_picking()\n+\n+\n+class stock_picking_out(osv.osv):\n+\n+    _inherit = 'stock.picking.out'\n+\n+    _columns = {\n+        'boi_type': fields.selection([\n+            ('NONBOI', 'NONBOI'),\n+            ('BOI', 'BOI'),\n+            ], 'BOI Type', required=True, select=True,\n+        ),\n+        'boi_number_id': fields.many2one('boi.certificate', 'BOI Number'),\n+    }\n+\n+    _defaults = {\n+        'boi_type': 'NONBOI',\n+    }\n+\n+    def create(self, cr, user, vals, context=None):\n+        if context is None:\n+            context = {}\n+        if vals.get('name', '/') == '/':\n+            if context.get('is_delivery_order', False):\n+                seq_obj_name =  self._name\n+                old_name = self.pool.get('ir.sequence').get(cr, user, seq_obj_name)\n+                vals['name'] = vals.get('boi_type') + '-' + old_name\n+            elif context.get('is_bom_move', False):\n+                vals['name'] = self.pool.get('ir.sequence').get(cr, user, 'bom.move')\n+                vals['name'] = vals.get('boi_type') + '-' + vals.get('name')\n+        return super(stock_picking_out, self).create(cr, user, vals, context=context)\n+\n+    def copy(self, cr, uid, id, default=None, context=None):\n+        if default is None:\n+            default = {}\n+        if context is None:\n+            context = {}\n+        print context","path":"boi/stock.py","position":85,"original_position":85,"commit_id":"ffe569b7a2c4df8c0d941fa95ec01f0653b6e4fe","original_commit_id":"ffe569b7a2c4df8c0d941fa95ec01f0653b6e4fe","user":{"login":"kittiu","id":1973598,"avatar_url":"https://avatars2.githubusercontent.com/u/1973598?v=3","gravatar_id":"","url":"https://api.github.com/users/kittiu","html_url":"https://github.com/kittiu","followers_url":"https://api.github.com/users/kittiu/followers","following_url":"https://api.github.com/users/kittiu/following{/other_user}","gists_url":"https://api.github.com/users/kittiu/gists{/gist_id}","starred_url":"https://api.github.com/users/kittiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kittiu/subscriptions","organizations_url":"https://api.github.com/users/kittiu/orgs","repos_url":"https://api.github.com/users/kittiu/repos","events_url":"https://api.github.com/users/kittiu/events{/privacy}","received_events_url":"https://api.github.com/users/kittiu/received_events","type":"User","site_admin":false},"body":"Remove","created_at":"2017-03-01T08:33:22Z","updated_at":"2017-03-01T08:33:22Z","html_url":"https://github.com/ecosoft-odoo/sqp/pull/32#discussion_r103632408","pull_request_url":"https://api.github.com/repos/ecosoft-odoo/sqp/pulls/32","_links":{"self":{"href":"https://api.github.com/repos/ecosoft-odoo/sqp/pulls/comments/103632408"},"html":{"href":"https://github.com/ecosoft-odoo/sqp/pull/32#discussion_r103632408"},"pull_request":{"href":"https://api.github.com/repos/ecosoft-odoo/sqp/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/ecosoft-odoo/sqp/pulls/32","id":108476555,"html_url":"https://github.com/ecosoft-odoo/sqp/pull/32","diff_url":"https://github.com/ecosoft-odoo/sqp/pull/32.diff","patch_url":"https://github.com/ecosoft-odoo/sqp/pull/32.patch","issue_url":"https://api.github.com/repos/ecosoft-odoo/sqp/issues/32","number":32,"state":"closed","locked":false,"title":"Enh pod boi edit boi 1","user":{"login":"newtratip","id":24691983,"avatar_url":"https://avatars2.githubusercontent.com/u/24691983?v=3","gravatar_id":"","url":"https://api.github.com/users/newtratip","html_url":"https://github.com/newtratip","followers_url":"https://api.github.com/users/newtratip/followers","following_url":"https://api.github.com/users/newtratip/following{/other_user}","gists_url":"https://api.github.com/users/newtratip/gists{/gist_id}","starred_url":"https://api.github.com/users/newtratip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newtratip/subscriptions","organizations_url":"https://api.github.com/users/newtratip/orgs","repos_url":"https://api.github.com/users/newtratip/repos","events_url":"https://api.github.com/users/newtratip/events{/privacy}","received_events_url":"https://api.github.com/users/newtratip/received_events","type":"User","site_admin":false},"body":"P'Nuii Plese review boi","created_at":"2017-03-01T06:37:42Z","updated_at":"2017-03-01T08:33:22Z","closed_at":"2017-03-01T06:43:44Z","merged_at":"2017-03-01T06:43:44Z","merge_commit_sha":"ffe569b7a2c4df8c0d941fa95ec01f0653b6e4fe","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ecosoft-odoo/sqp/pulls/32/commits","review_comments_url":"https://api.github.com/repos/ecosoft-odoo/sqp/pulls/32/comments","review_comment_url":"https://api.github.com/repos/ecosoft-odoo/sqp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ecosoft-odoo/sqp/issues/32/comments","statuses_url":"https://api.github.com/repos/ecosoft-odoo/sqp/statuses/ffe569b7a2c4df8c0d941fa95ec01f0653b6e4fe","head":{"label":"ecosoft-odoo:enh-pod-boi-edit_boi_1","ref":"enh-pod-boi-edit_boi_1","sha":"ffe569b7a2c4df8c0d941fa95ec01f0653b6e4fe","user":{"login":"ecosoft-odoo","id":13600991,"avatar_url":"https://avatars1.githubusercontent.com/u/13600991?v=3","gravatar_id":"","url":"https://api.github.com/users/ecosoft-odoo","html_url":"https://github.com/ecosoft-odoo","followers_url":"https://api.github.com/users/ecosoft-odoo/followers","following_url":"https://api.github.com/users/ecosoft-odoo/following{/other_user}","gists_url":"https://api.github.com/users/ecosoft-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/ecosoft-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecosoft-odoo/subscriptions","organizations_url":"https://api.github.com/users/ecosoft-odoo/orgs","repos_url":"https://api.github.com/users/ecosoft-odoo/repos","events_url":"https://api.github.com/users/ecosoft-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/ecosoft-odoo/received_events","type":"User","site_admin":false},"repo":{"id":40047976,"name":"sqp","full_name":"ecosoft-odoo/sqp","owner":{"login":"ecosoft-odoo","id":13600991,"avatar_url":"https://avatars1.githubusercontent.com/u/13600991?v=3","gravatar_id":"","url":"https://api.github.com/users/ecosoft-odoo","html_url":"https://github.com/ecosoft-odoo","followers_url":"https://api.github.com/users/ecosoft-odoo/followers","following_url":"https://api.github.com/users/ecosoft-odoo/following{/other_user}","gists_url":"https://api.github.com/users/ecosoft-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/ecosoft-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecosoft-odoo/subscriptions","organizations_url":"https://api.github.com/users/ecosoft-odoo/orgs","repos_url":"https://api.github.com/users/ecosoft-odoo/repos","events_url":"https://api.github.com/users/ecosoft-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/ecosoft-odoo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ecosoft-odoo/sqp","description":"Square Panel","fork":false,"url":"https://api.github.com/repos/ecosoft-odoo/sqp","forks_url":"https://api.github.com/repos/ecosoft-odoo/sqp/forks","keys_url":"https://api.github.com/repos/ecosoft-odoo/sqp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ecosoft-odoo/sqp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ecosoft-odoo/sqp/teams","hooks_url":"https://api.github.com/repos/ecosoft-odoo/sqp/hooks","issue_events_url":"https://api.github.com/repos/ecosoft-odoo/sqp/issues/events{/number}","events_url":"https://api.github.com/repos/ecosoft-odoo/sqp/events","assignees_url":"https://api.github.com/repos/ecosoft-odoo/sqp/assignees{/user}","branches_url":"https://api.github.com/repos/ecosoft-odoo/sqp/branches{/branch}","tags_url":"https://api.github.com/repos/ecosoft-odoo/sqp/tags","blobs_url":"https://api.github.com/repos/ecosoft-odoo/sqp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ecosoft-odoo/sqp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ecosoft-odoo/sqp/git/refs{/sha}","trees_url":"https://api.github.com/repos/ecosoft-odoo/sqp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ecosoft-odoo/sqp/statuses/{sha}","languages_url":"https://api.github.com/repos/ecosoft-odoo/sqp/languages","stargazers_url":"https://api.github.com/repos/ecosoft-odoo/sqp/stargazers","contributors_url":"https://api.github.com/repos/ecosoft-odoo/sqp/contributors","subscribers_url":"https://api.github.com/repos/ecosoft-odoo/sqp/subscribers","subscription_url":"https://api.github.com/repos/ecosoft-odoo/sqp/subscription","commits_url":"https://api.github.com/repos/ecosoft-odoo/sqp/commits{/sha}","git_commits_url":"https://api.github.com/repos/ecosoft-odoo/sqp/git/commits{/sha}","comments_url":"https://api.github.com/repos/ecosoft-odoo/sqp/comments{/number}","issue_comment_url":"https://api.github.com/repos/ecosoft-odoo/sqp/issues/comments{/number}","contents_url":"https://api.github.com/repos/ecosoft-odoo/sqp/contents/{+path}","compare_url":"https://api.github.com/repos/ecosoft-odoo/sqp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ecosoft-odoo/sqp/merges","archive_url":"https://api.github.com/repos/ecosoft-odoo/sqp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ecosoft-odoo/sqp/downloads","issues_url":"https://api.github.com/repos/ecosoft-odoo/sqp/issues{/number}","pulls_url":"https://api.github.com/repos/ecosoft-odoo/sqp/pulls{/number}","milestones_url":"https://api.github.com/repos/ecosoft-odoo/sqp/milestones{/number}","notifications_url":"https://api.github.com/repos/ecosoft-odoo/sqp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ecosoft-odoo/sqp/labels{/name}","releases_url":"https://api.github.com/repos/ecosoft-odoo/sqp/releases{/id}","deployments_url":"https://api.github.com/repos/ecosoft-odoo/sqp/deployments","created_at":"2015-08-01T13:48:54Z","updated_at":"2016-01-13T02:57:27Z","pushed_at":"2017-03-01T06:43:44Z","git_url":"git://github.com/ecosoft-odoo/sqp.git","ssh_url":"git@github.com:ecosoft-odoo/sqp.git","clone_url":"https://github.com/ecosoft-odoo/sqp.git","svn_url":"https://github.com/ecosoft-odoo/sqp","homepage":null,"size":60339,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":0,"forks":4,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ecosoft-odoo:master","ref":"master","sha":"0555cfc6cca82b129145ca748d6d43bec1a883f9","user":{"login":"ecosoft-odoo","id":13600991,"avatar_url":"https://avatars1.githubusercontent.com/u/13600991?v=3","gravatar_id":"","url":"https://api.github.com/users/ecosoft-odoo","html_url":"https://github.com/ecosoft-odoo","followers_url":"https://api.github.com/users/ecosoft-odoo/followers","following_url":"https://api.github.com/users/ecosoft-odoo/following{/other_user}","gists_url":"https://api.github.com/users/ecosoft-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/ecosoft-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecosoft-odoo/subscriptions","organizations_url":"https://api.github.com/users/ecosoft-odoo/orgs","repos_url":"https://api.github.com/users/ecosoft-odoo/repos","events_url":"https://api.github.com/users/ecosoft-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/ecosoft-odoo/received_events","type":"User","site_admin":false},"repo":{"id":40047976,"name":"sqp","full_name":"ecosoft-odoo/sqp","owner":{"login":"ecosoft-odoo","id":13600991,"avatar_url":"https://avatars1.githubusercontent.com/u/13600991?v=3","gravatar_id":"","url":"https://api.github.com/users/ecosoft-odoo","html_url":"https://github.com/ecosoft-odoo","followers_url":"https://api.github.com/users/ecosoft-odoo/followers","following_url":"https://api.github.com/users/ecosoft-odoo/following{/other_user}","gists_url":"https://api.github.com/users/ecosoft-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/ecosoft-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecosoft-odoo/subscriptions","organizations_url":"https://api.github.com/users/ecosoft-odoo/orgs","repos_url":"https://api.github.com/users/ecosoft-odoo/repos","events_url":"https://api.github.com/users/ecosoft-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/ecosoft-odoo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ecosoft-odoo/sqp","description":"Square Panel","fork":false,"url":"https://api.github.com/repos/ecosoft-odoo/sqp","forks_url":"https://api.github.com/repos/ecosoft-odoo/sqp/forks","keys_url":"https://api.github.com/repos/ecosoft-odoo/sqp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ecosoft-odoo/sqp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ecosoft-odoo/sqp/teams","hooks_url":"https://api.github.com/repos/ecosoft-odoo/sqp/hooks","issue_events_url":"https://api.github.com/repos/ecosoft-odoo/sqp/issues/events{/number}","events_url":"https://api.github.com/repos/ecosoft-odoo/sqp/events","assignees_url":"https://api.github.com/repos/ecosoft-odoo/sqp/assignees{/user}","branches_url":"https://api.github.com/repos/ecosoft-odoo/sqp/branches{/branch}","tags_url":"https://api.github.com/repos/ecosoft-odoo/sqp/tags","blobs_url":"https://api.github.com/repos/ecosoft-odoo/sqp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ecosoft-odoo/sqp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ecosoft-odoo/sqp/git/refs{/sha}","trees_url":"https://api.github.com/repos/ecosoft-odoo/sqp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ecosoft-odoo/sqp/statuses/{sha}","languages_url":"https://api.github.com/repos/ecosoft-odoo/sqp/languages","stargazers_url":"https://api.github.com/repos/ecosoft-odoo/sqp/stargazers","contributors_url":"https://api.github.com/repos/ecosoft-odoo/sqp/contributors","subscribers_url":"https://api.github.com/repos/ecosoft-odoo/sqp/subscribers","subscription_url":"https://api.github.com/repos/ecosoft-odoo/sqp/subscription","commits_url":"https://api.github.com/repos/ecosoft-odoo/sqp/commits{/sha}","git_commits_url":"https://api.github.com/repos/ecosoft-odoo/sqp/git/commits{/sha}","comments_url":"https://api.github.com/repos/ecosoft-odoo/sqp/comments{/number}","issue_comment_url":"https://api.github.com/repos/ecosoft-odoo/sqp/issues/comments{/number}","contents_url":"https://api.github.com/repos/ecosoft-odoo/sqp/contents/{+path}","compare_url":"https://api.github.com/repos/ecosoft-odoo/sqp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ecosoft-odoo/sqp/merges","archive_url":"https://api.github.com/repos/ecosoft-odoo/sqp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ecosoft-odoo/sqp/downloads","issues_url":"https://api.github.com/repos/ecosoft-odoo/sqp/issues{/number}","pulls_url":"https://api.github.com/repos/ecosoft-odoo/sqp/pulls{/number}","milestones_url":"https://api.github.com/repos/ecosoft-odoo/sqp/milestones{/number}","notifications_url":"https://api.github.com/repos/ecosoft-odoo/sqp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ecosoft-odoo/sqp/labels{/name}","releases_url":"https://api.github.com/repos/ecosoft-odoo/sqp/releases{/id}","deployments_url":"https://api.github.com/repos/ecosoft-odoo/sqp/deployments","created_at":"2015-08-01T13:48:54Z","updated_at":"2016-01-13T02:57:27Z","pushed_at":"2017-03-01T06:43:44Z","git_url":"git://github.com/ecosoft-odoo/sqp.git","ssh_url":"git@github.com:ecosoft-odoo/sqp.git","clone_url":"https://github.com/ecosoft-odoo/sqp.git","svn_url":"https://github.com/ecosoft-odoo/sqp","homepage":null,"size":60339,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":0,"forks":4,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ecosoft-odoo/sqp/pulls/32"},"html":{"href":"https://github.com/ecosoft-odoo/sqp/pull/32"},"issue":{"href":"https://api.github.com/repos/ecosoft-odoo/sqp/issues/32"},"comments":{"href":"https://api.github.com/repos/ecosoft-odoo/sqp/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/ecosoft-odoo/sqp/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/ecosoft-odoo/sqp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ecosoft-odoo/sqp/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/ecosoft-odoo/sqp/statuses/ffe569b7a2c4df8c0d941fa95ec01f0653b6e4fe"}}}}
{"actor":{"display_login":"kittiu"}}