Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
4117 Näkymät

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


Avatar
Hylkää
Paras vastaus

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
Hylkää
Tekijä

Thanks for your comment.

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
marrask. 23
1504
3
elok. 25
2594
1
toukok. 25
2632
1
huhtik. 25
3617
1
huhtik. 25
4486