diff --git a/addons/l10n_fr_certification/models/account.py b/addons/l10n_fr_certification/models/account.py index 07d5fc04e41..94db3c46273 100644 --- a/addons/l10n_fr_certification/models/account.py +++ b/addons/l10n_fr_certification/models/account.py @@ -144,8 +144,9 @@ class AccountJournal(models.Model): @api.multi def write(self, vals): # restrict the operation in case we are trying to write a forbidden field - if self.company_id.country_id.code == 'FR' and vals.get('update_posted'): - raise UserError(ERR_MSG % (self._name, 'update_posted')) + for rec in self: + if rec.company_id.country_id.code == 'FR' and vals.get('update_posted'): + raise UserError(ERR_MSG % (self._name, 'update_posted')) return super(AccountJournal, self).write(vals) @api.model