Commit 423198da authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Xiaowu Zhang

erp5_travel_expense: Fix, Stop processing record if they are duplicated

parent 8c1715ea
......@@ -17,6 +17,7 @@ new_record_list = portal.portal_catalog(
if len(new_record_list) != 1:
if record.getSimulationState() != "started":
record.start(comment="Multiple similar records detected, please pick one")
return
# It is the only record to be taken into account
if record.getSimulationState() != "started":
......
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