to start with I just want to be able to set a char field in a res.partner object given that the 'supplier' boolean is set to true. So far I know that I can use automated actions to call a server action when the supplier field is changed. I don't know how to write the python code for the server action. And I don't know how to only execute it if the boolean is true. Could I please get some pointers on this?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Бухгалтерия
- Склад
- PoS
- Project
- MRP
Этот вопрос был отмечен
Let me be more clear. In the res.partner.form view the user can tick or untick the checkbox which says that the contact is a 'Vendor' (by default the model calls this field 'supplier' and it is a boolean). I want to be able to set the value of a custom char field to 'whatever' if the 'supplier' boolean is set to true, otherwise I want that char field empty. This is all just a stepping stone for me to eventually be able to do something more complex but I'll omit that as I don't want to add complexity here.
So far I know that I can use automated actions to call a server action when the 'supplier' field is changed. I don't know how to write the python code for the server action. Could I please get some pointers on this?
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
РегистрацияRelated Posts | Ответы | Просмотры | Активность | |
---|---|---|---|---|
|
2
авг. 25
|
480 | ||
|
2
авг. 25
|
1493 | ||
|
0
февр. 25
|
1606 | ||
|
1
авг. 25
|
2215 | ||
|
2
дек. 24
|
1867 |
please elaborate your query ," I just want to be able to set a char field in a res.partner object given that the 'supplier' boolean is set to true" and "And I don't know how to only execute it if the boolean is true"
@Prakash Sharma does my response below make more sense?