İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
3987 Görünümler

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


Avatar
Vazgeç
En İyi Yanıt

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
Vazgeç
Üretici

Thanks for your comment.

İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Kas 23
1430
1
May 25
2440
1
Nis 25
3460
1
Nis 25
4280
1
Nis 25
1767