Skip to Content
Menu
This question has been flagged
4 Replies
2489 Views

Hi,

I have created a customer number field in partner form using odoo studio and also in sale order.I want to update the customer number field automatically  in sale order when choosing the customer.Is there any way to do it from the odoo itself. 

NB :- I'm using odoo online

Avatar
Discard
Best Answer

Hi,

You can do this by writing an automated action for this purpose.After clicking the customize icon we have the option called "Automations", after click on this we will have the option for creating a new automated action.

2020-02-06.png

Now we have the option for creating a new automated action, from there we can select the required model,actions and trigger condition.

Eg:

asdadsadads.png

You can find the useful details for writing the python code in the "Python code" tab

Hope it helps

Avatar
Discard
Best Answer

The Automated Action will do what you want, but a simpler way might be to add a Related Field to the sales order (to replace the new field you created).  More information: Relational fields in Odoo Studio

Start by dragging the “Related Field” button to the Form View

 

 

Select Customer and then the new field you added.

Avatar
Discard
Author Best Answer

Thanks for the reply,

can I have an example for such automated action

Avatar
Discard