When comparing a fields.Selection field value in Python code,
it would be useful to have autocompletion suggest the valid
selection values.
Example
Given a field like:
payment_state = fields.Selection([
('not_paid', 'Not Paid'),
('in_payment', 'In Payment'),
('paid', 'Paid'),
('partial', 'Partially Paid'),
])
When writing:
if move.payment_state == "pa"
The LSP should suggest: paid, partial
Why
It avoids having to go to the field definition (gd)
every time you need to know the valid values of a Selection field.
This would speed up development significantly.
Environment
- odoo_ls_server version: 1.2.0
- Editor: Neovim + NvChad
When comparing a
fields.Selectionfield value in Python code,it would be useful to have autocompletion suggest the valid
selection values.
Example
Given a field like:
When writing:
The LSP should suggest:
paid,partialWhy
It avoids having to go to the field definition (gd)
every time you need to know the valid values of a Selection field.
This would speed up development significantly.
Environment