diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index c1db0e5a903..0552636c84f 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1715,7 +1715,7 @@ class AccountMove(models.Model): @api.onchange('invoice_cash_rounding_id') def _onchange_invoice_cash_rounding_id(self): for move in self: - if move.invoice_cash_rounding_id and not move.invoice_cash_rounding_id.profit_account_id: + if move.invoice_cash_rounding_id.strategy == 'add_invoice_line' and not move.invoice_cash_rounding_id.profit_account_id: return {'warning': { 'title': _("Warning for Cash Rounding Method: %s", move.invoice_cash_rounding_id.name), 'message': _("You must specifiy the Profit Account (company dependent)")