I am trying to configure an automatic action to add a new order.line to the sale.order.
Example:
When the "pallet" is added to the sale order, the charge for the pallet should be added in a new order line by the automated action.
Problem:
The order_id (order reference) field in the sale.order.line is mandatory. I have to define when writing the field that always the order_id should be taken in which the pallet has been added.
Then still the quantity of charges must be the same as the quantity of pallets. So the field qty must also be written with a value that we have in the order.line with the pallet.
How can i do?