trytond-patches/model.diff

14 lines
674 B
Diff
Raw Normal View History

2023-01-04 16:05:47 +01:00
diff --git a/tryton/trytond/model/model.py b/trytond/model/model.py
index c4ab96fc..bdb1c78b 100644
2023-01-04 16:05:47 +01:00
--- a/tryton/trytond/trytond/model/model.py
+++ b/tryton/trytond/trytond/model/model.py
@@ -258,7 +258,7 @@ class Model(URLMixin, PoolBase, metaclass=ModelMeta):
name = name[len('_parent_'):]
parent_values[name][field] = value
value = parent_values[name]
- if getattr(self.__class__, name).context:
+ if hasattr(self.__class__, name) and getattr(self.__class__, name).context:
has_context[name] = value
for name, value in parent_values.items():