تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4043 أدوات العرض

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
نوفمبر 23
1485
3
أغسطس 25
2450
1
مايو 25
2577
1
أبريل 25
3539
1
أبريل 25
4385