I have created a studio field called "Customer Requested Ship Date" (x_studio_customer_requested_ship_date) on the Packing Slip/Delivery Order (stock.picking model).
Whenever a new Delivery Order is created I would like for the value in the Scheduled Date (scheduled_date) field to automatically be copied into the Customer Requested Ship Date field. (I want the initial value of the Customer Requested Ship Date to be the same as the Scheduled Date. In the future one or both dates may change, but I want them to start off the same).
Both fields are the Type "datetime"
My thought was to set this up as an automation rule that will execute code, but I would like to know the code to do this. What I have tried is:
record.['x_studio_customer_requested_ship_date'] = record.['scheduled_date']
but that doesn't seem to work.