diff --git a/account_fiscal_year_closing/models/account_fiscalyear_closing.py b/account_fiscal_year_closing/models/account_fiscalyear_closing.py index 3393971387e..94cdf52458b 100644 --- a/account_fiscal_year_closing/models/account_fiscalyear_closing.py +++ b/account_fiscal_year_closing/models/account_fiscalyear_closing.py @@ -553,13 +553,13 @@ class AccountFiscalyearClosingMapping(models.Model): @api.model def create(self, vals): - if "dest_account_id" in vals: + if "dest_account_id" in vals and type(vals["dest_account_id"]) == list: vals["dest_account_id"] = vals["dest_account_id"][0] res = super(AccountFiscalyearClosingMapping, self).create(vals) return res def write(self, vals): - if "dest_account_id" in vals: + if "dest_account_id" in vals and type(vals["dest_account_id"]) == list: vals["dest_account_id"] = vals["dest_account_id"][0] res = super(AccountFiscalyearClosingMapping, self).write(vals) return res