Clean install of Odoo 14 Enterprise edition. Utilizing the expiration date upon product receipt along with lot control.
When the user presses "validate" I want Odoo to take whatever date is entered in the Exipiration_date field and write it to the stock.production.lot table.
I am have this working via an automated action but I dont know how to write to a model other than the one the trigger is set upon.
I want to update the "removal_date" field in stock.production.lot using the product_id, name, and company_id fields. I believe I need the syntax on how to do this in python.
This feels a lot closer but I get this error upon trying to preform the transaction. Im sure its a data type mismatch but not sure how to handle that in Odoo
I solved this by Ray's idea but I had to use python code to make it work properly. 1 line
record['removal_date']=record.expiration_date
Odd. I tested again at v14 and it works fine for me, but your solution is fine also.