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

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
1516
3
ส.ค. 25
2653
1
พ.ค. 25
2664
1
เม.ย. 25
3666
1
เม.ย. 25
4518