Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
9282 Переглядів



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.