Hello,
I created a custom (many to one) field in the BOM > Work Order > Operation. When I create a manufacturing order and select a BOM, the value in that custom field must automatically appear just like the other operation details.
I know I need to create a python code on form modification, but I cant figure out the python code.
Thank you to anyone who will answer!
As you are using odoo online, you can write an onchange function from the user interface using the automated action, see: https://www.youtube.com/watch?v=psQF5jOrd48
Thank you! The video is helpful. I just dont understand which model I should reference to because the custom field is inside the operation line of the BOM?
you have to specify the main model, were the field exists
The new field is stored in Work Center Usage. I created the automated action:
Model : Work Order
Trigger Field: Operation (Work Order) (operation_id)
Data to write: New field (Work Order) = record.operation_id.x_studio_newfield
Its still wrong, how do I call the Work Center Usage model?