[FIX] account: bank statement currency

If there is no currency set on the journal,
the fallback currency must be the currency
of the journal company, not the currency
of the user company.

This would mean that when you change of company,
with another currency set,
the bank statement change of currency, this is non-sense.

opw-670187
This commit is contained in:
Denis Ledoux
2016-02-23 12:05:10 +01:00
parent c43889b5b9
commit 2fe11b8a2a
@@ -86,7 +86,7 @@ class AccountBankStatement(models.Model):
@api.one
@api.depends('journal_id')
def _compute_currency(self):
self.currency_id = self.journal_id.currency_id or self.env.user.company_id.currency_id
self.currency_id = self.journal_id.currency_id or self.company_id.currency_id
@api.one
@api.depends('line_ids.journal_entry_ids')