[trytond] Allows dynamic fields in Model as required by the wizard in sale_pos_template_quantities

This commit is contained in:
Juanjo Garcia 2020-02-12 15:13:51 +01:00
parent cabebf6428
commit e1c4939891
2 changed files with 15 additions and 0 deletions

13
model.diff Normal file
View File

@ -0,0 +1,13 @@
diff --git a/trytond/model/model.py b/trytond/model/model.py
index c4ab96fc..bdb1c78b 100644
--- a/trytond/trytond/model/model.py
+++ b/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():

2
series
View File

@ -46,3 +46,5 @@ issue8860.diff # [stock_forecast] stock_forecast does not spread all the quantit
statement_of_account.diff # [account] Cumulate balance of previous fiscal years
issue9017.diff # [purchase] Doesn't copy product_suppliers when a template or a product is duplicated
model.diff # [trytond] Allows dynamic fields in Model as required by the wizard in sale_pos_template_quantities