mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX] account_chart_update: Handle updated m2m correctly
This commit is contained in:
committed by
Reyes4711
parent
26ff1f0ffd
commit
c5a6eb2bf4
@@ -422,8 +422,10 @@ class WizardUpdateChartsAccounts(models.TransientModel):
|
||||
result[key] = expected
|
||||
elif template[key] != real[key]:
|
||||
result[key] = template[key]
|
||||
if isinstance(result.get(key, False), models.Model):
|
||||
# Avoid to cache recordset references
|
||||
# Avoid to cache recordset references
|
||||
if isinstance(real._fields[key], fields.Many2many):
|
||||
result[key] = [(6, 0, result[key].ids)]
|
||||
elif isinstance(real._fields[key], fields.Many2one):
|
||||
result[key] = result[key].id
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user