[FIX] account: allow to use quantity in taxes computated with python code
This commit is contained in:
parent
817ce8f912
commit
3540484138
|
@ -2022,7 +2022,7 @@ class account_tax(osv.osv):
|
||||||
data['tax_amount']=quantity
|
data['tax_amount']=quantity
|
||||||
# data['amount'] = quantity
|
# data['amount'] = quantity
|
||||||
elif tax.type=='code':
|
elif tax.type=='code':
|
||||||
localdict = {'price_unit':cur_price_unit, 'product':product, 'partner':partner}
|
localdict = {'price_unit':cur_price_unit, 'product':product, 'partner':partner, 'quantity': quantity}
|
||||||
exec tax.python_compute in localdict
|
exec tax.python_compute in localdict
|
||||||
amount = localdict['result']
|
amount = localdict['result']
|
||||||
data['amount'] = amount
|
data['amount'] = amount
|
||||||
|
|
Loading…
Reference in New Issue