Hello everyone,
I created a custom field to display the status label from the quality check module to the delivery orders module. I use a computed field to display the status label.
Dependencies: check_ids.quality_state
Code:
for record in self:
if quality_state == "none":
record['x_studio_quality_checks'] = "To Do"
elif quality_state == "pass":
record['x_studio_quality_checks'] = "Passed"
else:
record['x_studio_quality_checks'] = "Failed"
Error:
NameError: name 'quality_state' is not defined
ValueError: : "name 'quality_state' is not defined" while evaluating 'for record in self:\r\n if quality_state == "none":\r\n record[\'x_studio_quality_checks\'] = "To Do"\r\n elif quality_state == "pass":\r\n record[\'x_studio_quality_checks\'] = "Passed"\r\n else:\r\n record[\'x_studio_quality_checks\'] = "Failed"'