Commit 84ec50c9 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Print the path of an invalid Trade Model Line, otherwise no way to detect which object is wrong.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34866 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8e67815e
...@@ -236,8 +236,8 @@ class TradeCondition(Path, Transformation): ...@@ -236,8 +236,8 @@ class TradeCondition(Path, Transformation):
for movement in movement_list: for movement in movement_list:
movement_reference = movement.getReference() movement_reference = movement.getReference()
if movement_reference is None: if movement_reference is None:
raise ValueError('Reference on Trade Model Line is None. ' raise ValueError('Reference on Trade Model Line %s is None. '
'Reference must be set.') 'Reference must be set.' % (movement.getPath(),))
for model_line in trade_model_line_composed_list: for model_line in trade_model_line_composed_list:
if model_line.getReference() == movement_reference and\ if model_line.getReference() == movement_reference and\
(force_create_line or model_line.isCreateLine()): (force_create_line or model_line.isCreateLine()):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment