[FIX] account: avoid cache miss when computing currency

A compute method should always assign something to the computed field(s)

X-original-commit: f58f7b858b3daee223238c519993ccd771595ac4
This commit is contained in:
RomainLibert
2019-10-16 14:17:27 +00:00
committed by fw-bot
parent e0ba61d9fb
commit f561202d3e
@@ -47,6 +47,7 @@ class AccountBankStmtCashWizard(models.Model):
@api.depends('start_bank_stmt_ids', 'end_bank_stmt_ids')
def _compute_currency(self):
for cashbox in self:
cashbox.currency_id = False
if cashbox.end_bank_stmt_ids:
cashbox.currency_id = cashbox.end_bank_stmt_ids[0].currency_id
if cashbox.start_bank_stmt_ids: