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



Hello,

I have one selection field

advance_payment_method = fields.Selection([
('delivered', 'Invoiceable lines'),
('all', 'Invoiceable lines (deduct down payments)'),
('percentage', 'Down payment (percentage)'),
('fixed', 'Down payment (fixed amount)')
])
i used this field in my wizard.  <field name = "advance_payment_metho" class="oe_inline" widget="radio"/>

Now i didn't want ('delivered', 'Invoiceable lines') option in my wizard , i just need remain 3 option.It's posssible?.

Thanks in advance

아바타
취소
베스트 답변

Hi,

For this what you can do is that, just inherit the corresponding model and redefine the selection field without the value which has to be removed.

Class ClassName(models.Model):

_inherit  = 'model.name'
advance_payment_method = fields.Selection([
('all', 'Invoiceable lines (deduct down payments)'),
('percentage', 'Down payment (percentage)'),
('fixed', 'Down payment (fixed amount)')
])


Thanks

아바타
취소
작성자

Thank you

It's working.