Skip to main content
OdooLS provides rich, context-aware autocompletion across Python and XML files in Odoo projects. Completions are derived from the live symbol graph that OdooLS builds as it indexes your codebase, so results stay accurate as you add or modify models.

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 completes self.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)
# Trigger completion here ↓ — no closing bracket required
partner = self.env["res.par

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)
class SaleOrder(models.Model):
    _name = "sale.order"

    line_ids = fields.One2many(
        comodel_name="sale.order.line",
        inverse_name="order_id",  # ← completed from sale.order.line's Many2one fields
    )

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.
def get_partner(self):
    return self.env["res.partner"].browse(self.partner_id.id)

def do_something(self):
    p = self.get_partner()
    p.  # ← completes fields on res.partner

Configuration

Filtering model name completions

By default, the ac_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.
[[config]]
ac_filter_model_names = true  # default — only suggests models in your dependencies
Keeping ac_filter_model_names = true (the default) helps catch missing entries in your __manifest__.py depends list early. If a model you need is not appearing in completions, check that the module declaring it is listed as a dependency.

Build docs developers (and LLMs) love