Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
3977 Tampilan

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


Avatar
Buang
Jawaban Terbai

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
Buang
Penulis

Thanks for your comment.

Post Terkait Replies Tampilan Aktivitas
1
Nov 23
1415
1
Mei 25
2416
1
Apr 25
3435
1
Apr 25
4255
1
Apr 25
1746