Commit 88cf1857 authored by Yusei Tahara's avatar Yusei Tahara

Reference on Trade Model Line is always necessary. It must not be empty.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30881 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f1423558
......@@ -237,6 +237,8 @@ class TradeCondition(Path, Transformation, XMLMatrix):
aggregated_amount_list = AggregatedAmountList()
for movement in movement_list:
movement_reference = movement.getReference()
if movement_reference is None:
raise ValueError, 'Reference on Trade Model Line is None. Reference must be set.'
for model_line in trade_model_line_composed_list:
if model_line.getReference() == movement_reference and\
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