Improve browse

This commit is contained in:
Bernat Brunet Torruella 2017-07-12 12:38:29 +02:00
parent 5cca008d48
commit 40ee156756
1 changed files with 1 additions and 1 deletions

View File

@ -253,7 +253,7 @@ class InvoiceLine:
tax_name = '%s_taxes_used' % ('customer' if type[:2] == 'in'
else 'supplier')
with Transaction().set_context(company=target_company.id):
product, = Product.browse([self.product.id])
product = Product(self.product.id)
taxes = getattr(product, tax_name, [])
return taxes