details: https://code.tryton.org/tryton/commit/20d79a09c9a6
branch: default
user: Nicolas Évrard <[email protected]>
date: Tue Jun 09 18:33:51 2026 +0200
description:
Save the new ir.model.data instances before calling functions on them
Closes #14885
diffstat:
trytond/trytond/convert.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diffs (12 lines):
diff -r 1a003fa7e62b -r 20d79a09c9a6 trytond/trytond/convert.py
--- a/trytond/trytond/convert.py Fri Jun 12 23:42:19 2026 +0200
+++ b/trytond/trytond/convert.py Tue Jun 09 18:33:51 2026 +0200
@@ -595,6 +595,8 @@
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())