[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 97c7f1dda6
commit 4be226a45d
2 changed files with 16 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():

3
series
View File

@ -42,3 +42,6 @@ issue7805.diff # [stock] [stock_lot_sled] Allow configuring which quantity is gr
issue8860.diff # [stock_forecast] stock_forecast does not spread all the quantities
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