[FIX] l10n_fr_certification: allow multi write on account.journal

Closes #20594
This commit is contained in:
Simone Orsi
2017-11-17 16:31:19 +01:00
committed by Martin Trigaux
parent 144a528616
commit 00ce67ee43
@@ -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