diff --git a/addons/account/models/account.py b/addons/account/models/account.py index eb0b26b6963..ac1dab1c0bf 100644 --- a/addons/account/models/account.py +++ b/addons/account/models/account.py @@ -97,7 +97,7 @@ class AccountAccount(models.Model): name = fields.Char(required=True, index=True) currency_id = fields.Many2one('res.currency', string='Account Currency', - help="Forces all moves for this account to have this account currency.") + help="Forces all moves for this account to have this secondary currency.") code = fields.Char(size=64, required=True, index=True) deprecated = fields.Boolean(index=True, default=False) user_type_id = fields.Many2one('account.account.type', string='Type', required=True, oldname="user_type", diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 2b82cef6c85..b59ac8831aa 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -410,8 +410,8 @@ class AccountMoveLine(models.Model): def _check_currency(self): for line in self: if line.account_id.currency_id: - if not line.currency_id or line.currency_id.id != line.account_id.currency_id.id: - raise ValidationError(_('The selected account of your Journal Entry forces to provide a secondary currency. You should remove the secondary currency on the account.')) + if not line.journal_id.currency_id and line.company_id.currency_id.id != line.account_id.currency_id.id or line.journal_id.currency_id.id != line.account_id.currency_id.id: + raise ValidationError(_('The selected account of your Journal Entry force to provide a secondary currency. You should either remove the secondary currency on the account or match the currency of your journal with your account currency.')) @api.multi @api.constrains('currency_id', 'amount_currency')