textDocument/hover request to OdooLS, which responds with a Markdown-formatted card. OdooLS supports hover in Python files, XML data files, and __manifest__.py manifest files.
Hover contexts
Symbol types
Hovering over any variable, parameter, or expression shows its inferred type. OdooLS follows return values through chains of function calls and assignments to determine the most specific type it can resolve.
Model information
Hovering over a model name string (e.g.,
"res.partner" in self.env["res.partner"]) shows the model’s technical name, its parent models via _inherit, and a summary of the fields it declares.Field information
Hovering over a field access (e.g.,
self.partner_id) shows the field type (Many2one, Char, Integer, …) and, for relational fields, the comodel_name they point to.XML ID references
Hovering over an XML ID — in a
ref attribute in XML or in env.ref() in Python — shows the details of the referenced record: its model, the file where it is declared, and its full XML ID.Module names in manifests
Hovering over a module name string in the
depends list of __manifest__.py shows the full list of that module’s own dependencies, giving you a quick view of the transitive dependency tree. (Added in 1.2.0)Import statements
Hovering over an import statement shows the resolved module or symbol information — the file path it resolves to and its inferred type. (Added in 1.2.0)
Following return values
Hover information follows return values through multiple layers of indirection. If a variable is assigned from a function call, OdooLS traces the return type of that function (and any functions it calls in turn) to display the most precise type available:Model hover example
Hovering over"res.partner" in a self.env lookup produces output similar to:
Manifest module hover
Hovering over a dependency name in__manifest__.py shows that module’s full dependency list at a glance, without having to open the target manifest:
Hover results are computed from OdooLS’s in-memory symbol graph. If a module is not on your configured addon paths, hover information for symbols from that module may be incomplete or unavailable.