Tryton - Issues

 

Issue8273

Title Crash GTK when try change location in stock shipment internal
Priority bug Status need-eg
Superseder Nosy List ced, resteve
Type crash Components tryton
Assigned To Keywords
Reviews

Created on 2019-04-12.10:53:47 by resteve, last changed by ced.

Messages
msg52705 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-10-25.12:19:00
Still can not reproduce with 896 moves on trunk.
msg52485 (view) Author: [hidden] (resteve) Date: 2019-10-14.10:38:04
Step 4, when remove all lines (o2m), you could change the location (is not readonly).
msg52422 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-10-11.17:57:48
Mark as invalid because it is not allowed to change the "From Location" (readonly) once there are moves filled.
msg49226 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-04-28.00:28:15
We need the full traceback to be able to understand something.
msg48859 (view) Author: [hidden] (resteve) Date: 2019-04-12.10:53:46
Scenario:

1. Create a internal shipment with more than 160 lines (moves), for example, with 300 lines.
2. Save
3- Duplicate (optional)
4- Remove lines in o2m (not save)
5- Try to change "From location".

I get this traceback:

....
File "/home/resteve/tryton/tryton48/tryton/common/domain_inversion.py", line 232, in parse
   return And(domain[1:] if domain[0] == 'AND' else domain)
 File "/home/resteve/tryton/tryton48/tryton/common/domain_inversion.py", line 249, in __init__
   self.branches = map(parse, expressions)
 File "/home/resteve/tryton/tryton48/tryton/common/domain_inversion.py", line 232, in parse
   return And(domain[1:] if domain[0] == 'AND' else domain)
 File "/home/resteve/tryton/tryton48/tryton/common/domain_inversion.py", line 249, in __init__
   self.branches = map(parse, expressions)
 File "/home/resteve/tryton/tryton48/tryton/common/domain_inversion.py", line 225, in parse
   if is_leaf(domain):
 File "/home/resteve/tryton/tryton48/tryton/common/domain_inversion.py", line 42, in is_leaf
   return (isinstance(expression, (list, tuple))
RuntimeError: maximum recursion depth exceeded in __instancecheck__

Successfully I can change "From Location" in case the shipment are less 150 lines (moves) because the loop not crash (maximum recursion)

Domain log in parse() method in domain_inversion.py is:

[[[u'from_location', u'child_of', [None], u'parent'], [u'to_location', u'child_of', [36], u'parent']]]
[[u'from_location', u'child_of', [None], u'parent'], [u'to_location', u'child_of', [36], u'parent']]
[u'from_location', u'child_of', [None], u'parent']
[u'to_location', u'child_of', [36], u'parent']
[]


GTK client version 4.8.14.
History
Date User Action Args
2019-10-25 12:19:00cedsetstatus: chatting -> need-eg
messages: + msg52705
2019-10-14 10:38:05restevesetstatus: invalid -> chatting
messages: + msg52485
2019-10-11 17:57:48cedsetstatus: need-eg -> invalid
messages: + msg52422
2019-04-28 00:28:16cedsetstatus: chatting -> need-eg
nosy: + ced
messages: + msg49226
2019-04-12 16:36:53cedsetpriority: critical -> bug
2019-04-12 10:53:47restevecreate

Showing 10 items. Show all history (warning: this could be VERY long)