Hi. I'm trying to set an automated action in the Sales Order model that creates a new sales order line (for an existing product) every time I add a specific sales order line with the product_template_id called Project A.
For example, when I create a new sales order and then add the product Project A, and then save it, it should automatically add the product Set Up to my lines.
I configured the automated actions like this:
Model: Sales Order Line
Trigger: On Update
Apply on: Match records with the rule: "Product Template>Name=Project A"
Action To Do: Create a New Record
Target model: Sales Order Line
Data to Write:
Field: Order Reference (Sales Order Line)
Evaluation Type: Python expression
Record:
Value: record.id
Field: Product Template
(Sales Order Line)
Evaluation Type: Reference
Record: Set Up
Value: 6
With this configuration, I encounter the following issue:
Missing Record: Record does not exist or has been deleted (Record: sale order(145), User: 14
I have been testing, and I can't get this to work. Could someone help me? Thank you.