{"action":"created","comment":{"url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/comments/24633886","id":24633886,"diff_hunk":"@@ -0,0 +1,132 @@\n+# -*- encoding: utf-8 -*-\n+###########################################################################\n+#    Module Writen to OpenERP, Open Source Management Solution\n+#\n+#    Copyright (c) 2013 Vauxoo - http://www.vauxoo.com/\n+#    All Rights Reserved.\n+#    info Vauxoo (info@vauxoo.com)\n+############################################################################\n+#    Coded by: Luis Ernesto García Medina (ernesto_gm@vauxoo.com)\n+############################################################################\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 import models, fields, api\n+\n+\n+class account_invoice_tax(models.Model):\n+    _inherit = 'account.invoice.tax'\n+\n+    tax_partner_id = fields.Many2one('res.partner', 'Supplier', readonly=True)\n+\n+\n+class AccountInvoiceLine(models.Model):\n+    _inherit = 'account.invoice.line'\n+\n+    invoice_broker_id = fields.Many2one(\n+        'account.invoice', 'Invoice Broker', help='If this invoice line is to '\n+        'the payment to a broker, indicate the original invoice that must be '\n+        'generated the broker partner', domain=[('type', '=', 'in_invoice')])\n+    partner_broker_ok = fields.Boolean(","path":"account_broker/model/account_invoice.py","position":43,"original_position":43,"commit_id":"363bd6e4476bd8ce7f8c40f598a16b43a0e7e279","original_commit_id":"363bd6e4476bd8ce7f8c40f598a16b43a0e7e279","user":{"login":"moylop260","id":6644187,"avatar_url":"https://avatars.githubusercontent.com/u/6644187?v=3","gravatar_id":"","url":"https://api.github.com/users/moylop260","html_url":"https://github.com/moylop260","followers_url":"https://api.github.com/users/moylop260/followers","following_url":"https://api.github.com/users/moylop260/following{/other_user}","gists_url":"https://api.github.com/users/moylop260/gists{/gist_id}","starred_url":"https://api.github.com/users/moylop260/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moylop260/subscriptions","organizations_url":"https://api.github.com/users/moylop260/orgs","repos_url":"https://api.github.com/users/moylop260/repos","events_url":"https://api.github.com/users/moylop260/events{/privacy}","received_events_url":"https://api.github.com/users/moylop260/received_events","type":"User","site_admin":false},"body":"@luistorresm \r\nMueve este boolean a `account.invoice` y usa en la vista de `account.invoice.line` un\r\n```xml\r\n<field name=\"invoice_broker_id\" attrs=\"{'invisible':[('parent.partner_broker_ok','=',False)]}\"/>\r\n```\r\nPara que no tengas que estar calculando este dato por cada línea, si siempre va a ser el mismo de manera global.\r\n\r\nIncluso pensando mientras te escribía, prueba si la nueva api ya valida lo siguiente:\r\n```xml\r\n<field name=\"invoice_broker_id\" attrs=\"{'invisible':[('parent.partner_id.partner_broker_ok','=',False)]}\"/>\r\n```\r\n(Probando el caso, cuando intentas crear una línea de factura, sin haber asignado partner aun, para ver que no explote).\r\nSi sí funciona así, no necesitarás un fields.function incluso.\r\n","created_at":"2015-02-13T00:06:10Z","updated_at":"2015-02-13T00:06:10Z","html_url":"https://github.com/Vauxoo/addons-vauxoo/pull/100#discussion_r24633886","pull_request_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/100","_links":{"self":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/comments/24633886"},"html":{"href":"https://github.com/Vauxoo/addons-vauxoo/pull/100#discussion_r24633886"},"pull_request":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/100"}}},"pull_request":{"url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/100","id":28661670,"html_url":"https://github.com/Vauxoo/addons-vauxoo/pull/100","diff_url":"https://github.com/Vauxoo/addons-vauxoo/pull/100.diff","patch_url":"https://github.com/Vauxoo/addons-vauxoo/pull/100.patch","issue_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/issues/100","number":100,"state":"open","locked":false,"title":"[ADD][account_broker] added new module to get partner tax of lines for journal entries.","user":{"login":"ernesto-gm","id":7605672,"avatar_url":"https://avatars.githubusercontent.com/u/7605672?v=3","gravatar_id":"","url":"https://api.github.com/users/ernesto-gm","html_url":"https://github.com/ernesto-gm","followers_url":"https://api.github.com/users/ernesto-gm/followers","following_url":"https://api.github.com/users/ernesto-gm/following{/other_user}","gists_url":"https://api.github.com/users/ernesto-gm/gists{/gist_id}","starred_url":"https://api.github.com/users/ernesto-gm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ernesto-gm/subscriptions","organizations_url":"https://api.github.com/users/ernesto-gm/orgs","repos_url":"https://api.github.com/users/ernesto-gm/repos","events_url":"https://api.github.com/users/ernesto-gm/events{/privacy}","received_events_url":"https://api.github.com/users/ernesto-gm/received_events","type":"User","site_admin":false},"body":"[ADD][account_broker] added new module to get partner tax of lines for journal entries.","created_at":"2015-02-04T18:19:30Z","updated_at":"2015-02-13T00:06:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"da44dc2269a4ab38287e470886c303a8e93eb5a3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/100/commits","review_comments_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/100/comments","review_comment_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/issues/100/comments","statuses_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/statuses/363bd6e4476bd8ce7f8c40f598a16b43a0e7e279","head":{"label":"vauxoo-dev:8.0-account-broker-dev-ernesto","ref":"8.0-account-broker-dev-ernesto","sha":"363bd6e4476bd8ce7f8c40f598a16b43a0e7e279","user":{"login":"vauxoo-dev","id":7662790,"avatar_url":"https://avatars.githubusercontent.com/u/7662790?v=3","gravatar_id":"","url":"https://api.github.com/users/vauxoo-dev","html_url":"https://github.com/vauxoo-dev","followers_url":"https://api.github.com/users/vauxoo-dev/followers","following_url":"https://api.github.com/users/vauxoo-dev/following{/other_user}","gists_url":"https://api.github.com/users/vauxoo-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/vauxoo-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vauxoo-dev/subscriptions","organizations_url":"https://api.github.com/users/vauxoo-dev/orgs","repos_url":"https://api.github.com/users/vauxoo-dev/repos","events_url":"https://api.github.com/users/vauxoo-dev/events{/privacy}","received_events_url":"https://api.github.com/users/vauxoo-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":27313681,"name":"addons-vauxoo","full_name":"vauxoo-dev/addons-vauxoo","owner":{"login":"vauxoo-dev","id":7662790,"avatar_url":"https://avatars.githubusercontent.com/u/7662790?v=3","gravatar_id":"","url":"https://api.github.com/users/vauxoo-dev","html_url":"https://github.com/vauxoo-dev","followers_url":"https://api.github.com/users/vauxoo-dev/followers","following_url":"https://api.github.com/users/vauxoo-dev/following{/other_user}","gists_url":"https://api.github.com/users/vauxoo-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/vauxoo-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vauxoo-dev/subscriptions","organizations_url":"https://api.github.com/users/vauxoo-dev/orgs","repos_url":"https://api.github.com/users/vauxoo-dev/repos","events_url":"https://api.github.com/users/vauxoo-dev/events{/privacy}","received_events_url":"https://api.github.com/users/vauxoo-dev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vauxoo-dev/addons-vauxoo","description":"","fork":true,"url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo","forks_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/forks","keys_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/teams","hooks_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/hooks","issue_events_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/issues/events{/number}","events_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/events","assignees_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/assignees{/user}","branches_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/branches{/branch}","tags_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/tags","blobs_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/statuses/{sha}","languages_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/languages","stargazers_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/stargazers","contributors_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/contributors","subscribers_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/subscribers","subscription_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/subscription","commits_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/issues/comments/{number}","contents_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/contents/{+path}","compare_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/merges","archive_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/downloads","issues_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/issues{/number}","pulls_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/pulls{/number}","milestones_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/milestones{/number}","notifications_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/labels{/name}","releases_url":"https://api.github.com/repos/vauxoo-dev/addons-vauxoo/releases{/id}","created_at":"2014-11-29T20:09:46Z","updated_at":"2014-11-29T20:09:54Z","pushed_at":"2015-02-12T22:28:28Z","git_url":"git://github.com/vauxoo-dev/addons-vauxoo.git","ssh_url":"git@github.com:vauxoo-dev/addons-vauxoo.git","clone_url":"https://github.com/vauxoo-dev/addons-vauxoo.git","svn_url":"https://github.com/vauxoo-dev/addons-vauxoo","homepage":"","size":63668,"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":"master"}},"base":{"label":"Vauxoo:8.0","ref":"8.0","sha":"95d169f967bb02d43e5eb6d458a3fef663fbdfc0","user":{"login":"Vauxoo","id":5997834,"avatar_url":"https://avatars.githubusercontent.com/u/5997834?v=3","gravatar_id":"","url":"https://api.github.com/users/Vauxoo","html_url":"https://github.com/Vauxoo","followers_url":"https://api.github.com/users/Vauxoo/followers","following_url":"https://api.github.com/users/Vauxoo/following{/other_user}","gists_url":"https://api.github.com/users/Vauxoo/gists{/gist_id}","starred_url":"https://api.github.com/users/Vauxoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vauxoo/subscriptions","organizations_url":"https://api.github.com/users/Vauxoo/orgs","repos_url":"https://api.github.com/users/Vauxoo/repos","events_url":"https://api.github.com/users/Vauxoo/events{/privacy}","received_events_url":"https://api.github.com/users/Vauxoo/received_events","type":"Organization","site_admin":false},"repo":{"id":27311720,"name":"addons-vauxoo","full_name":"Vauxoo/addons-vauxoo","owner":{"login":"Vauxoo","id":5997834,"avatar_url":"https://avatars.githubusercontent.com/u/5997834?v=3","gravatar_id":"","url":"https://api.github.com/users/Vauxoo","html_url":"https://github.com/Vauxoo","followers_url":"https://api.github.com/users/Vauxoo/followers","following_url":"https://api.github.com/users/Vauxoo/following{/other_user}","gists_url":"https://api.github.com/users/Vauxoo/gists{/gist_id}","starred_url":"https://api.github.com/users/Vauxoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vauxoo/subscriptions","organizations_url":"https://api.github.com/users/Vauxoo/orgs","repos_url":"https://api.github.com/users/Vauxoo/repos","events_url":"https://api.github.com/users/Vauxoo/events{/privacy}","received_events_url":"https://api.github.com/users/Vauxoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Vauxoo/addons-vauxoo","description":"All our modules related to developments that solves generic issues on Odoo, or that solve internal problems on Odoo Core","fork":false,"url":"https://api.github.com/repos/Vauxoo/addons-vauxoo","forks_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/forks","keys_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/teams","hooks_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/hooks","issue_events_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/issues/events{/number}","events_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/events","assignees_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/assignees{/user}","branches_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/branches{/branch}","tags_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/tags","blobs_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/statuses/{sha}","languages_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/languages","stargazers_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/stargazers","contributors_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/contributors","subscribers_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/subscribers","subscription_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/subscription","commits_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/issues/comments/{number}","contents_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/contents/{+path}","compare_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/merges","archive_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/downloads","issues_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/issues{/number}","pulls_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls{/number}","milestones_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/milestones{/number}","notifications_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/labels{/name}","releases_url":"https://api.github.com/repos/Vauxoo/addons-vauxoo/releases{/id}","created_at":"2014-11-29T18:51:03Z","updated_at":"2015-02-12T03:53:28Z","pushed_at":"2015-02-12T03:53:28Z","git_url":"git://github.com/Vauxoo/addons-vauxoo.git","ssh_url":"git@github.com:Vauxoo/addons-vauxoo.git","clone_url":"https://github.com/Vauxoo/addons-vauxoo.git","svn_url":"https://github.com/Vauxoo/addons-vauxoo","homepage":"http://www.vauxoo.com","size":63583,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":35,"forks":15,"open_issues":35,"watchers":9,"default_branch":"8.0"}},"_links":{"self":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/100"},"html":{"href":"https://github.com/Vauxoo/addons-vauxoo/pull/100"},"issue":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/issues/100"},"comments":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/issues/100/comments"},"review_comments":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/100/comments"},"review_comment":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/pulls/100/commits"},"statuses":{"href":"https://api.github.com/repos/Vauxoo/addons-vauxoo/statuses/363bd6e4476bd8ce7f8c40f598a16b43a0e7e279"}}}}