Completion categories
Model names
Completing inside
self.env["res.par"] suggests res.partner, res.partner.bank, and other matching model names. OdooLS resolves the registry at the current module’s dependency level, so only models reachable from your module appear.Field names
Field names on a model — including inherited fields — are completed when you type
self. or chain off a recordset. Relational fields such as Many2one, One2many, and Many2many also complete the fields of their comodel.XML IDs
XML IDs are completed in
env.ref("module.xml_id") calls in Python and in ref, id, and inherit_id attributes in XML files. Only IDs from the current module and its declared dependencies are suggested.Method arguments
Keyword arguments for function calls are completed based on the resolved function signature. For field declarations, OdooLS completes Odoo-specific keyword arguments such as
comodel_name, inverse_name, related, compute, store, and domain.Import statements
Python
import and from ... import statements are completed across the entire Odoo codebase. Module paths, sub-packages, and exported names are all suggested as you type. (Added in 1.2.0)Related field chains
Dot-notation chains in
related arguments are completed field-by-field. Typing related="partner_id.country_id.co" will suggest code, currency_id, and other fields on res.country.Slice completion
OdooLS completesself.env[" even when the closing "] has not been typed yet. This lets you trigger model-name suggestions immediately after opening the subscript bracket without having to close it first. (Added in 1.2.0)
inverse_name on One2many fields
When declaring a One2many field, OdooLS completes the inverse_name keyword argument with the valid Many2one (or Many2oneReference) fields from the target comodel. (Added in 1.2.1)
Following return values through references
When autocompleting function call arguments, OdooLS follows return values through multiple levels of indirection. If a helper function returns the result of another call, OdooLS traces the chain to determine the real type and offer accurate completions.Configuration
Filtering model name completions
By default, theac_filter_model_names setting is true, which restricts model name completions to models that are valid within the current module’s dependency graph. Set it to false to see all models in the indexed codebase regardless of dependency.