mirror of
https://github.com/NaN-tic/trytond-patches.git
synced 2023-12-14 06:03:03 +01:00
add fix for Creating sequence on fiscalyear: ValueError: Double underscores not allowed
This commit is contained in:
parent
12fd6fa4c5
commit
91e9d63f6c
17
issue5681002_1_10001.diff
Normal file
17
issue5681002_1_10001.diff
Normal file
|
@ -0,0 +1,17 @@
|
|||
Index: trytond/model/modelview.py
|
||||
===================================================================
|
||||
|
||||
--- a/trytond/trytond/model/modelview.py
|
||||
+++ b/trytond/trytond/model/modelview.py
|
||||
@@ -426,7 +426,9 @@
|
||||
# convert attributes into pyson
|
||||
encoder = PYSONEncoder()
|
||||
for attr in ('states', 'domain', 'spell', 'colors'):
|
||||
- if element.get(attr):
|
||||
+ if (element.get(attr)
|
||||
+ # Avoid double evaluation from inherit with different model
|
||||
+ and '__' not in element.get(attr)):
|
||||
element.set(attr, encoder.encode(safe_eval(element.get(attr),
|
||||
CONTEXT)))
|
||||
|
||||
|
Loading…
Reference in a new issue