I have a model where I am simply trying to copy the integer value from the field named "id" to a variable so that I can pass it to another model and store it so that it can be reference later. I'm doing this in an automated action.
my_id = record.id
new_order=env['sale.order'].create({'x_quote_id': my_id})
The trouble is that it always returns 0.
Is there another way I can recall and store the value?