Save the new ir.model.data instances before calling functions on them

Closes #14885
This commit is contained in:
Nicolas Évrard
2026-06-09 18:33:51 +02:00
parent 2f57974cef
commit 962c9d02a1
+2
View File
@@ -595,6 +595,8 @@ class TrytondXmlHandler(sax.handler.ContentHandler):
if new_values:
to_update += [[record], values]
if values.keys() - set(mdata.field_names):
if mdata.id is None:
mdata.save()
field_names = dict(mdata.get_field_names()).keys()
mdata.field_names = tuple(
(set(mdata.field_names) & field_names) | values.keys())