Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
9264 Vistas



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
Descartar
Mejor respuesta

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
Descartar
Autor

Thank you

It's working.