line/splitline: optimize value-update on create/write
This commit is contained in:
parent
82ae7d7bca
commit
3b289b7944
4 changed files with 97 additions and 34 deletions
2
mixin.py
2
mixin.py
|
@ -59,14 +59,12 @@ class SecondCurrencyMixin:
|
|||
Cashbook = pool.get('cashbook.book')
|
||||
IrDate = pool.get('ir.date')
|
||||
|
||||
#cashbook = values.get('cashbook', None)
|
||||
booktransf = values.get('booktransf', None)
|
||||
amount = values.get('amount', None)
|
||||
amount_2nd_currency = values.get('amount_2nd_currency', None)
|
||||
|
||||
if (amount is not None) and (booktransf is not None):
|
||||
if amount_2nd_currency is None:
|
||||
#cashbook = Cashbook(cashbook)
|
||||
booktransf = Cashbook(booktransf)
|
||||
if from_currency.id != booktransf.currency.id:
|
||||
with Transaction().set_context({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue