[FIX] base: in res.config.settings, field.related is a string
It used to be a tuple.
Cf: 1abe965b59
opw-2681777
closes odoo/odoo#81312
X-original-commit: aa74f51db7bf5a8ad1f4e309b6352df3c31037ec
Signed-off-by: Raphael Collet <rco@odoo.com>
This commit is contained in:
committed by
Raphael Collet
parent
588cab25a1
commit
c5ae057618
@@ -776,7 +776,7 @@ class ResConfigSettings(models.TransientModel, ResConfigModuleInstallationMixin)
|
||||
continue
|
||||
# we write on a related field like
|
||||
# qr_code = fields.Boolean(related='company_id.qr_code', readonly=False)
|
||||
fname0 = field.related[0]
|
||||
fname0, *fnames = field.related.split(".")
|
||||
if fname0 not in values:
|
||||
continue
|
||||
|
||||
@@ -784,7 +784,7 @@ class ResConfigSettings(models.TransientModel, ResConfigModuleInstallationMixin)
|
||||
field0 = self._fields[fname0]
|
||||
old_value = field0.convert_to_record(
|
||||
field0.convert_to_cache(values[fname0], self), self)
|
||||
for fname in field.related[1:]:
|
||||
for fname in fnames:
|
||||
old_value = next(iter(old_value), old_value)[fname]
|
||||
|
||||
# determine the new value
|
||||
|
||||
Reference in New Issue
Block a user