Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
2 Besvarelser
9275 Visninger



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

Avatar
Kassér
Bedste svar

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

Avatar
Kassér
Forfatter

Thank you

It's working.