Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4169 มุมมอง

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


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
ผู้เขียน

Thanks for your comment.

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ย. 23
1518
3
ส.ค. 25
2670
1
พ.ค. 25
2668
1
เม.ย. 25
3670
1
เม.ย. 25
4520