STOCK: use tax from sale for invoice

bzr revid: ced-a7779d54145e24499dcb18ea342e201ca3e9ed1b
This commit is contained in:
ced 2007-02-15 13:57:11 +00:00
parent 07d8aedb14
commit 0e507920af
1 changed files with 4 additions and 1 deletions

View File

@ -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