view-field-without-widget (ODOO012)#
A view shows a field without the widget that suits it.
What it does#
Reports fields in form and list views that have no widget while one
suits their type, the way a reviewer would:
Field |
Widget |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Hidden fields (invisible="1", column_invisible="1") are left alone.
Why is this bad?#
It works, but reads worse: a many2many as a list of ids, a state as a plain selection, a domain as raw text. Odoo’s own views use these widgets.
Configuration#
Opt-in: select it (select = ["ALL", "ODOO012"]), as it is a style
review rather than an error. It needs the field types of the dependencies,
Odoo’s included, in addons-path.
Fix safety#
Unsafe: the fix adds the widget attribute, which changes how the view
looks; a domain widget may want options="{'model': ...}" as well.