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,6 +53,9 @@ if portal_type == "Traceability": ...@@ -53,6 +53,9 @@ 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":
if resource_value.getDestinationReference():
product_reference = resource_value.getDestinationReference()
else:
product_reference = resource_value.getReference().split('-')[-1] 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