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

The new key should not be added at the end. it should be added in the middle.For example, Assume that we have draft,quotation,order in state(selection) field. I need to add new key as 'verification' before 'order' key in selection field.
Any Solution?

아바타
취소

I think it you need to add in the middle, then you might have to rewrite the field with new selections instead of using selection_add

베스트 답변

Create new class that inherits your base class, overwrite your state fields as below:

state = fields.Selection(selection_add=[('verifcation', 'Verification'), ('order',)])

You can search with 'selection_add' in Odoo base(fields.py), to see more details in Odoo 13.

아바타
취소
베스트 답변

The Selection field accepts a method so provide that method to the selection value create a method and return the values in the order that you want.

아바타
취소
관련 게시물 답글 화면 활동
2
8월 25
2534
1
7월 25
950
1
8월 25
1151
0
5월 25
1396
2
4월 25
3591