Commit 467ca7bb authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

erp5_mrp_quality_assurance: Use product reference for traceability stored in a dedicated field

previous implementation was not compatible with reference containing "-"
parent c8b27751
......@@ -53,7 +53,10 @@ if portal_type == "Traceability":
if not fixit:
return ['No quality assurance element found']
if ME_insurance.getLedger() == "manufacturing/quality_insurance":
product_reference = resource_value.getReference().split('-')[-1]
if resource_value.getDestinationReference():
product_reference = resource_value.getDestinationReference()
else:
product_reference = resource_value.getReference().split('-')[-1]
else:
product_reference = resource_value.getReference()
......
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