Skip to Content
मेन्यू
This question has been flagged
1 Reply
3972 Views

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


Avatar
Discard
Best Answer

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
Discard
Author

Thanks for your comment.

Related Posts Replies Views Activity
1
नव॰ 23
1405
1
मई 25
2397
1
अप्रैल 25
3425
1
अप्रैल 25
4239
1
अप्रैल 25
1738