-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[trytond] Allows dynamic fields in Model as required by the wizard in…
… sale_pos_template_quantities
- Loading branch information
1 parent
97c7f1d
commit 4be226a
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters