Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
4126 Ansichten

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


Avatar
Verwerfen
Beste Antwort

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

Avatar
Verwerfen
Autor

Thanks for your comment.

Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Nov. 23
1507
3
Aug. 25
2608
1
Mai 25
2639
1
Apr. 25
3627
1
Apr. 25
4490