콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
4430 화면

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
1708
5
9월 25
21374
3
8월 25
3066
1
5월 25
2949
1
4월 25
3931