{"action":"created","comment":{"url":"https://api.github.com/repos/Comunitea/CMNT_004_15/pulls/comments/152044785","pull_request_review_id":77846074,"id":152044785,"diff_hunk":"@@ -0,0 +1,226 @@\n+# -*- coding: utf-8 -*-\n+##############################################################################\n+#\n+#    Copyright (C) 2017 Visiotech All Rights Reserved\n+#    $Jesus Garcia Manzanas <jgmanzanas@visiotechsecurity.com>$\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 published\n+#    by 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 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+from openerp.addons.connector.event import on_record_create, on_record_write, \\\n+    on_record_unlink\n+from openerp.addons.connector.queue.job import job\n+from .utils import _get_exporter\n+from ..backend import middleware\n+from openerp.addons.connector.unit.synchronizer import Exporter\n+from ..unit.backend_adapter import GenericAdapter\n+import base64\n+\n+\n+@middleware\n+class PickingExporter(Exporter):\n+\n+    _model_name = ['stock.picking']\n+\n+    def update(self, binding_id, mode):\n+        picking = self.model.browse(binding_id)\n+        report = self.env['report'].browse(picking.id)\n+        result = report.get_pdf('stock.report_picking_custom')\n+        result_encode = base64.b64encode(result)\n+        name = picking.name.replace(\"\\\\\", \"/\")\n+        vals = {\n+                \"odoo_id\": picking.id,\n+                \"name\": name,\n+                \"partner_id\": picking.partner_id.id,","path":"project-addons/flask_middleware_connector/events/picking_events.py","position":45,"original_position":45,"commit_id":"29c19183451f77c33e6c9ab96ada671b8896c440","original_commit_id":"29c19183451f77c33e6c9ab96ada671b8896c440","user":{"login":"jgmanzanas","id":22660449,"avatar_url":"https://avatars3.githubusercontent.com/u/22660449?v=4","gravatar_id":"","url":"https://api.github.com/users/jgmanzanas","html_url":"https://github.com/jgmanzanas","followers_url":"https://api.github.com/users/jgmanzanas/followers","following_url":"https://api.github.com/users/jgmanzanas/following{/other_user}","gists_url":"https://api.github.com/users/jgmanzanas/gists{/gist_id}","starred_url":"https://api.github.com/users/jgmanzanas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgmanzanas/subscriptions","organizations_url":"https://api.github.com/users/jgmanzanas/orgs","repos_url":"https://api.github.com/users/jgmanzanas/repos","events_url":"https://api.github.com/users/jgmanzanas/events{/privacy}","received_events_url":"https://api.github.com/users/jgmanzanas/received_events","type":"User","site_admin":false},"body":"Hmmmm vale, reviso entonces esta parte del codigo. Lo de los trabajos que fallan supongo que seran los contactos duplicados, de todas formas este martes lo compruebo","created_at":"2017-11-20T16:40:47Z","updated_at":"2017-11-20T16:40:47Z","html_url":"https://github.com/Comunitea/CMNT_004_15/pull/58#discussion_r152044785","pull_request_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/pulls/58","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Comunitea/CMNT_004_15/pulls/comments/152044785"},"html":{"href":"https://github.com/Comunitea/CMNT_004_15/pull/58#discussion_r152044785"},"pull_request":{"href":"https://api.github.com/repos/Comunitea/CMNT_004_15/pulls/58"}},"in_reply_to_id":152035387},"pull_request":{"url":"https://api.github.com/repos/Comunitea/CMNT_004_15/pulls/58","id":153662506,"html_url":"https://github.com/Comunitea/CMNT_004_15/pull/58","diff_url":"https://github.com/Comunitea/CMNT_004_15/pull/58.diff","patch_url":"https://github.com/Comunitea/CMNT_004_15/pull/58.patch","issue_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/issues/58","number":58,"state":"open","locked":false,"title":"Cambios Realizados","user":{"login":"jgmanzanas","id":22660449,"avatar_url":"https://avatars3.githubusercontent.com/u/22660449?v=4","gravatar_id":"","url":"https://api.github.com/users/jgmanzanas","html_url":"https://github.com/jgmanzanas","followers_url":"https://api.github.com/users/jgmanzanas/followers","following_url":"https://api.github.com/users/jgmanzanas/following{/other_user}","gists_url":"https://api.github.com/users/jgmanzanas/gists{/gist_id}","starred_url":"https://api.github.com/users/jgmanzanas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgmanzanas/subscriptions","organizations_url":"https://api.github.com/users/jgmanzanas/orgs","repos_url":"https://api.github.com/users/jgmanzanas/repos","events_url":"https://api.github.com/users/jgmanzanas/events{/privacy}","received_events_url":"https://api.github.com/users/jgmanzanas/received_events","type":"User","site_admin":false},"body":"- [IMP] 'stock_custom': Incluido un campo marca related al campo marca del producto para mostrar en la vista de valoracion de inventario.\r\n- [FIX] 'sale_margin_percentage': Modificada la funcion _product_margin que se encarga de hacer el calculo del margen en la lineas de producto del pedido. Ahora cuando el precio de venta (incluido descuento y cantidad de producto) es menor que el precio de compra (incluida cantidad) se utiliza el precio de compra en el calculo del porcentaje del margen\r\n- [IMP] 'vt_flask_middleware': Incluido el modelo de picking y pickingproducts en flask para la exportacion de albaranes.\r\n- [IMP] 'flask_middleware_connector': Incluidos métodos de envió de albaranes y productos de albaranes a flask\r\n- [IMP] 'flask_middleware_connector': Incluidos los nuevos archivos en el __init__\r\n- [IMP] 'vt_flask_middleware_connector': Incluido albaranes y productos de albaranes como modelos en flask\r\n- [IMP] 'stock_custom': Llamada a la función de creación de producto de albarán, esto se realiza en este archivo ya que el stock move tiene un picking asociado cuando llega a este punto.\r\n- [IMP] 'product_stock_unsafety': Incluido campo calculado 'cantidad mínima de compra' para que se haga una estimación de cuantos productos se deberían de comprar con el stock que nos queda, las ventas en 60 días y el ciclo de pedido del producto","created_at":"2017-11-20T15:43:37Z","updated_at":"2017-11-20T16:40:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf43bd9eeee70aff7749dea6dee66846fae37456","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/pulls/58/commits","review_comments_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/pulls/58/comments","review_comment_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/issues/58/comments","statuses_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/statuses/29c19183451f77c33e6c9ab96ada671b8896c440","head":{"label":"jgmanzanas:jgmanzanas","ref":"jgmanzanas","sha":"29c19183451f77c33e6c9ab96ada671b8896c440","user":{"login":"jgmanzanas","id":22660449,"avatar_url":"https://avatars3.githubusercontent.com/u/22660449?v=4","gravatar_id":"","url":"https://api.github.com/users/jgmanzanas","html_url":"https://github.com/jgmanzanas","followers_url":"https://api.github.com/users/jgmanzanas/followers","following_url":"https://api.github.com/users/jgmanzanas/following{/other_user}","gists_url":"https://api.github.com/users/jgmanzanas/gists{/gist_id}","starred_url":"https://api.github.com/users/jgmanzanas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgmanzanas/subscriptions","organizations_url":"https://api.github.com/users/jgmanzanas/orgs","repos_url":"https://api.github.com/users/jgmanzanas/repos","events_url":"https://api.github.com/users/jgmanzanas/events{/privacy}","received_events_url":"https://api.github.com/users/jgmanzanas/received_events","type":"User","site_admin":false},"repo":{"id":72113082,"name":"CMNT_004_15","full_name":"jgmanzanas/CMNT_004_15","owner":{"login":"jgmanzanas","id":22660449,"avatar_url":"https://avatars3.githubusercontent.com/u/22660449?v=4","gravatar_id":"","url":"https://api.github.com/users/jgmanzanas","html_url":"https://github.com/jgmanzanas","followers_url":"https://api.github.com/users/jgmanzanas/followers","following_url":"https://api.github.com/users/jgmanzanas/following{/other_user}","gists_url":"https://api.github.com/users/jgmanzanas/gists{/gist_id}","starred_url":"https://api.github.com/users/jgmanzanas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgmanzanas/subscriptions","organizations_url":"https://api.github.com/users/jgmanzanas/orgs","repos_url":"https://api.github.com/users/jgmanzanas/repos","events_url":"https://api.github.com/users/jgmanzanas/events{/privacy}","received_events_url":"https://api.github.com/users/jgmanzanas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jgmanzanas/CMNT_004_15","description":null,"fork":true,"url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15","forks_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/forks","keys_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/teams","hooks_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/hooks","issue_events_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/issues/events{/number}","events_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/events","assignees_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/assignees{/user}","branches_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/branches{/branch}","tags_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/tags","blobs_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/git/refs{/sha}","trees_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/statuses/{sha}","languages_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/languages","stargazers_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/stargazers","contributors_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/contributors","subscribers_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/subscribers","subscription_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/subscription","commits_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/commits{/sha}","git_commits_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/git/commits{/sha}","comments_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/comments{/number}","issue_comment_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/issues/comments{/number}","contents_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/contents/{+path}","compare_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/merges","archive_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/downloads","issues_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/issues{/number}","pulls_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/pulls{/number}","milestones_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/milestones{/number}","notifications_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/labels{/name}","releases_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/releases{/id}","deployments_url":"https://api.github.com/repos/jgmanzanas/CMNT_004_15/deployments","created_at":"2016-10-27T13:52:57Z","updated_at":"2017-09-20T17:14:17Z","pushed_at":"2017-11-20T13:46:29Z","git_url":"git://github.com/jgmanzanas/CMNT_004_15.git","ssh_url":"git@github.com:jgmanzanas/CMNT_004_15.git","clone_url":"https://github.com/jgmanzanas/CMNT_004_15.git","svn_url":"https://github.com/jgmanzanas/CMNT_004_15","homepage":null,"size":21293,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"Comunitea:master","ref":"master","sha":"52fe5b0e27e1e9c13054465c2f91d393106c8b03","user":{"login":"Comunitea","id":11162919,"avatar_url":"https://avatars1.githubusercontent.com/u/11162919?v=4","gravatar_id":"","url":"https://api.github.com/users/Comunitea","html_url":"https://github.com/Comunitea","followers_url":"https://api.github.com/users/Comunitea/followers","following_url":"https://api.github.com/users/Comunitea/following{/other_user}","gists_url":"https://api.github.com/users/Comunitea/gists{/gist_id}","starred_url":"https://api.github.com/users/Comunitea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Comunitea/subscriptions","organizations_url":"https://api.github.com/users/Comunitea/orgs","repos_url":"https://api.github.com/users/Comunitea/repos","events_url":"https://api.github.com/users/Comunitea/events{/privacy}","received_events_url":"https://api.github.com/users/Comunitea/received_events","type":"Organization","site_admin":false},"repo":{"id":36653955,"name":"CMNT_004_15","full_name":"Comunitea/CMNT_004_15","owner":{"login":"Comunitea","id":11162919,"avatar_url":"https://avatars1.githubusercontent.com/u/11162919?v=4","gravatar_id":"","url":"https://api.github.com/users/Comunitea","html_url":"https://github.com/Comunitea","followers_url":"https://api.github.com/users/Comunitea/followers","following_url":"https://api.github.com/users/Comunitea/following{/other_user}","gists_url":"https://api.github.com/users/Comunitea/gists{/gist_id}","starred_url":"https://api.github.com/users/Comunitea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Comunitea/subscriptions","organizations_url":"https://api.github.com/users/Comunitea/orgs","repos_url":"https://api.github.com/users/Comunitea/repos","events_url":"https://api.github.com/users/Comunitea/events{/privacy}","received_events_url":"https://api.github.com/users/Comunitea/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Comunitea/CMNT_004_15","description":null,"fork":true,"url":"https://api.github.com/repos/Comunitea/CMNT_004_15","forks_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/forks","keys_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/teams","hooks_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/hooks","issue_events_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/issues/events{/number}","events_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/events","assignees_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/assignees{/user}","branches_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/branches{/branch}","tags_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/tags","blobs_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/git/refs{/sha}","trees_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/statuses/{sha}","languages_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/languages","stargazers_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/stargazers","contributors_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/contributors","subscribers_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/subscribers","subscription_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/subscription","commits_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/commits{/sha}","git_commits_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/git/commits{/sha}","comments_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/comments{/number}","issue_comment_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/issues/comments{/number}","contents_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/contents/{+path}","compare_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/merges","archive_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/downloads","issues_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/issues{/number}","pulls_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/pulls{/number}","milestones_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/milestones{/number}","notifications_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/labels{/name}","releases_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/releases{/id}","deployments_url":"https://api.github.com/repos/Comunitea/CMNT_004_15/deployments","created_at":"2015-06-01T10:32:07Z","updated_at":"2016-10-24T14:00:48Z","pushed_at":"2017-11-20T15:43:38Z","git_url":"git://github.com/Comunitea/CMNT_004_15.git","ssh_url":"git@github.com:Comunitea/CMNT_004_15.git","clone_url":"https://github.com/Comunitea/CMNT_004_15.git","svn_url":"https://github.com/Comunitea/CMNT_004_15","homepage":null,"size":21270,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Comunitea/CMNT_004_15/pulls/58"},"html":{"href":"https://github.com/Comunitea/CMNT_004_15/pull/58"},"issue":{"href":"https://api.github.com/repos/Comunitea/CMNT_004_15/issues/58"},"comments":{"href":"https://api.github.com/repos/Comunitea/CMNT_004_15/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/Comunitea/CMNT_004_15/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/Comunitea/CMNT_004_15/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Comunitea/CMNT_004_15/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/Comunitea/CMNT_004_15/statuses/29c19183451f77c33e6c9ab96ada671b8896c440"}},"author_association":"NONE"}}
{"actor":{"display_login":"jgmanzanas"}}