Skip to content

Commit

Permalink
[trytond] Allows dynamic fields in Model as required by the wizard in…
Browse files Browse the repository at this point in the history
… sale_pos_template_quantities
  • Loading branch information
juanjo-nan committed Feb 12, 2020
1 parent 97c7f1d commit 4be226a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions model.diff
Original file line number Diff line number Diff line change
@@ -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 changes: 3 additions & 0 deletions series
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4be226a

Please sign in to comment.