[FIX] account: do not show alert on posted invoice/bill
Steps to reproduce: * Activate multi-currency (Company currency `USD`, another currency activated 'EUR') * Create invoice/bill in `EUR` and post it * Archive `EUR' * Open Invoice/Bill Issue: * Alert for inactivated currency is always displayed Fix: * Alert for inactivated currency should be displayed in draft state only closes odoo/odoo#158802 X-original-commit: 72a0058ec748a03351ab3ad7536ff7089f84262e Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
This commit is contained in:
@@ -1406,7 +1406,7 @@ class AccountMove(models.Model):
|
||||
@api.depends('currency_id')
|
||||
def _compute_display_inactive_currency_warning(self):
|
||||
for move in self.with_context(active_test=False):
|
||||
move.display_inactive_currency_warning = move.currency_id and not move.currency_id.active
|
||||
move.display_inactive_currency_warning = move.state == 'draft' and move.currency_id and not move.currency_id.active
|
||||
|
||||
@api.depends('company_id.account_fiscal_country_id', 'fiscal_position_id', 'fiscal_position_id.country_id', 'fiscal_position_id.foreign_vat')
|
||||
def _compute_tax_country_id(self):
|
||||
|
||||
Reference in New Issue
Block a user