Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
9269 มุมมอง



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.