跳至內容
選單
此問題已被標幟
1 回覆
4157 瀏覽次數

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.

相關帖文 回覆 瀏覽次數 活動
1
11月 23
1516
3
8月 25
2643
1
5月 25
2662
1
4月 25
3658
1
4月 25
4513