Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
4013 Vizualizări

I need to update sales order statuses.
Add new states and buttons.


Imagine profil
Abandonează
Cel mai bun răspuns

Hi,

You can use the selection_add attribute to add new values into the existing selection field. You should inherit the sale.order model and add the new state to the existing selection field.


eg:_inherit = 'sale.order'
state = fields.Selection(selection_add=[('c', 'C'), ('d', 'D')])

Here's a video for your reference:https://www.youtube.com/watch?v=wsf0y_2AVP8&ab_channel=CybrosysTechnologies

To add button and to call function when clicked, you can refer this video:https://www.youtube.com/watch?v=IPJwnFNb6RQ

Hope it helps

Imagine profil
Abandonează
Autor

Thanks for your comment.

Related Posts Răspunsuri Vizualizări Activitate
1
nov. 23
1449
3
aug. 25
2228
1
mai 25
2506
1
apr. 25
3497
1
apr. 25
4324