Commit 108abd5f 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 e1ee216f
...@@ -53,7 +53,10 @@ if portal_type == "Traceability": ...@@ -53,7 +53,10 @@ if portal_type == "Traceability":
if not fixit: if not fixit:
return ['No quality assurance element found'] return ['No quality assurance element found']
if ME_insurance.getLedger() == "manufacturing/quality_insurance": 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: else:
product_reference = resource_value.getReference() 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