From 0e507920af84ae64e996fb3a53d5a33d9895e7db Mon Sep 17 00:00:00 2001 From: ced <> Date: Thu, 15 Feb 2007 13:57:11 +0000 Subject: [PATCH] STOCK: use tax from sale for invoice bzr revid: ced-a7779d54145e24499dcb18ea342e201ca3e9ed1b --- addons/stock/stock.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index b325574bfc9..600eba16118 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -522,7 +522,10 @@ class stock_picking(osv.osv): res[p.id]= invoice_id for line in p.move_lines: - tax_ids = map(lambda x: x.id, line.product_id.taxes_id) + if line.sale_line_id: + tax_ids = map(lambda x: x.id, line.sale_line_id.tax_id) + else: + tax_ids = map(lambda x: x.id, line.product_id.taxes_id) a = line.product_id.product_tmpl_id.property_account_income if not a: a = line.product_id.categ_id.property_account_income_categ