Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
4333 Weergaven

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


Avatar
Annuleer
Beste antwoord

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
Annuleer
Auteur

Thanks for your comment.

Gerelateerde posts Antwoorden Weergaven Activiteit
1
nov. 23
1647
5
sep. 25
20948
3
aug. 25
3013
1
mei 25
2896
1
apr. 25
3867