From 5ae5ba465fd5c300b3edc10371147cebc5e4f03a Mon Sep 17 00:00:00 2001 From: qdp Date: Thu, 11 Sep 2008 11:28:30 +0200 Subject: [PATCH] *bugfixed: the customer tax and supplier tax were inversed in the product_id_change method of invoice line. bzr revid: qdp@tinyerp.com-20080911092830-tqkdvmel8e25hn8p --- addons/account/invoice.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 93f91811b0f..86ea0fbd2b2 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -804,11 +804,10 @@ class account_invoice_line(osv.osv): context.update({'lang': lang}) res = self.pool.get('product.product').browse(cr, uid, product, context=context) taxep=None - if partner_id: - lang=self.pool.get('res.partner').read(cr, uid, [partner_id])[0]['lang'] + lang=self.pool.get('res.partner').read(cr, uid, [partner_id])[0]['lang'] tax_obj = self.pool.get('account.tax') if type in ('out_invoice', 'out_refund'): - taxep = self.pool.get('res.partner').browse(cr, uid, partner_id).property_account_supplier_tax + taxep = self.pool.get('res.partner').browse(cr, uid, partner_id).property_account_tax if not taxep or not taxep.id: tax_id = map(lambda x: x.id, res.taxes_id) else: @@ -817,7 +816,7 @@ class account_invoice_line(osv.osv): if not t.tax_group==taxep.tax_group: tax_id.append(t.id) else: - taxep = self.pool.get('res.partner').browse(cr, uid, partner_id).property_account_tax + taxep = self.pool.get('res.partner').browse(cr, uid, partner_id).property_account_supplier_tax if not taxep or not taxep.id: tax_id = map(lambda x: x.id, res.supplier_taxes_id) else: