Skip to main content
OLS05xxx diagnostics validate the XML data files listed in your module’s data and demo manifest keys. OdooLS checks XML structure, node types, attribute validity, XML ID references, and cross-module references.
OdooLS validates XML against Odoo’s data file schema, not generic XML validity. A file can be well-formed XML but still trigger OLS05xxx diagnostics if it violates Odoo’s data loading rules.

Parsing and XML IDs

Default severity: ErrorMessage: Unable to parse XML file: {0}The XML file could not be parsed. The error detail from the XML parser is appended to the message.Fix: Check the file for malformed XML: unclosed tags, invalid characters, or encoding issues.
Default severity: ErrorMessage: Unknown XML IDA ref attribute or similar XML ID reference points to an ID that OdooLS cannot find in the current module or any of its dependencies.Fix: Verify the XML ID exists and is declared before the point of reference. Use the module.xml_id format to be explicit about the source module.
Default severity: ErrorMessage: Unspecified module. Add the module name before the XML ID: 'module.xml_id'An XML ID was provided without a module prefix. Cross-module references must use the module.xml_id format.Fix: Prefix the XML ID with the module name: my_module.my_record_id.
Default severity: ErrorMessage: Unknown moduleThe module part of a module.xml_id reference is not known to OdooLS.Fix: Check that the module name is correct and that its addon path is configured.
Default severity: ErrorMessage: Empty XML ID. Please provide a valid XML ID.An attribute that expects an XML ID was given an empty string.Fix: Provide a valid non-empty XML ID.
Default severity: ErrorMessage: Invalid XML ID '{0}'. It should not contain more than one dot.XML IDs must be in the format xml_id (no dot) or module.xml_id (one dot). More than one dot is invalid.Fix: Use the format module.xml_id with exactly one dot.

Root node validation

Default severity: ErrorMessage: Invalid attributeThe root <odoo>, <openerp>, or <data> node contains an attribute that is not valid for that node.Fix: Remove the invalid attribute. Check the Odoo documentation for valid attributes on root data file nodes.
Default severity: ErrorMessage: Invalid node tagA node with an unrecognized tag was found inside an Odoo data file.Fix: Use only valid Odoo data file node types: <record>, <menuitem>, <report>, <function>, <delete>, etc.
Default severity: ErrorMessage: Data file {0} not found in the moduleA file listed in the manifest’s data or demo key does not exist on disk relative to the module directory.Fix: Check the file path for typos and ensure the file exists at the specified relative path.
Default severity: ErrorMessage: Data file {0} is not a valid XML, CSV, or SQL fileA file listed in the manifest’s data key has an extension that Odoo does not recognise as a loadable data file.Fix: Only .xml, .csv, and .sql files are valid data file types.

<menuitem> validation

Default severity: ErrorMessage: menuitem node must contains an id attributeEvery <menuitem> node must have an id attribute so it can be referenced as an XML ID.Fix: Add an id attribute to the <menuitem> node.
Default severity: ErrorMessage: Invalid attribute {0} in menuitem nodeThe attribute named in the message is not a valid attribute for <menuitem> nodes.Fix: Remove the invalid attribute or replace it with a valid one.
Default severity: ErrorMessage: Sequence attribute must be a string representing an integerThe sequence attribute on a <menuitem> must be a string that represents a valid integer (e.g. "10").Fix: Set sequence to a quoted integer: sequence="10".
Default severity: ErrorMessage: SubmenuItem is not allowed when action and parent attributes are defined on a menuitemA <menuitem> that has both action and parent attributes cannot also contain child menu items.Fix: Remove either the child items or the action/parent attributes depending on your intent.
Default severity: ErrorMessage: web_icon attribute is not allowed when parent is specifiedThe web_icon attribute is only valid on top-level menu items (those without a parent). It cannot be combined with the parent attribute.Fix: Remove either web_icon or parent from the <menuitem>.
Default severity: ErrorMessage: Invalid child node {0} in menuitemA <menuitem> contains a child node that is not allowed in that position.Fix: Remove the invalid child node.
Default severity: ErrorMessage: parent attribute is not allowed in submenuitemsA nested <menuitem> (submenu item) has a parent attribute, which is redundant and invalid — the parent relationship is already implied by the nesting.Fix: Remove the parent attribute from the nested <menuitem>.
Default severity: ErrorMessage: Parent menuitem with id '{0}' does not existThe XML ID referenced in the parent attribute of a <menuitem> does not correspond to any known menuitem in the current module or its dependencies.Fix: Check the parent XML ID for typos and ensure the parent menuitem is declared before this item.
Default severity: ErrorMessage: Action with id '{0}' does not existThe XML ID in the action attribute of a <menuitem> has not been declared before this menuitem.Fix: Declare the action record before the menuitem in the XML file, or move the menuitem after the action declaration.
Default severity: ErrorMessage: Group(s) with id(s) '{0}' does not existOne or more XML IDs listed in the groups attribute of a <menuitem> do not correspond to known security groups.Fix: Check the group XML IDs for typos and ensure the groups are declared in the current module or a dependency.

<record> and <field> validation

Default severity: ErrorMessage: Invalid attribute {0} in record nodeThe attribute named in the message is not valid on a <record> node.Fix: Remove the invalid attribute. Valid attributes for <record> include id, model, and forcecreate.
Default severity: ErrorMessage: record node must contain a model attributeA <record> node is missing the required model attribute, which specifies which Odoo model the record belongs to.Fix: Add model="your.model.name" to the <record> node.
Default severity: ErrorMessage: Invalid child node {0} in record. Only field node is allowedOnly <field> nodes are permitted as direct children of a <record> node.Fix: Remove the invalid child node or replace it with a <field> element.
Default severity: ErrorMessage: field node must contain a name attributeEvery <field> node inside a <record> must have a name attribute identifying the model field it sets.Fix: Add name="field_name" to the <field> node.
Default severity: ErrorMessage: field node cannot have more than one of the attributes type, ref, eval or searchA <field> node may carry only one of type, ref, eval, or search at a time. Having more than one is ambiguous.Fix: Keep only the one attribute that fits your use case.
Default severity: ErrorMessage: Invalid content for int field: {0}A <field type="int"> node contains text that cannot be parsed as an integer or None.Fix: Set the field content to a valid integer string or None.
Default severity: ErrorMessage: Invalid content for float field: {0}A <field type="float"> node contains text that cannot be parsed as a floating-point number.Fix: Set the field content to a valid float string (e.g. 3.14).
Default severity: ErrorMessage: Invalid child node {0} in list/tuple fieldA <field type="list"> or <field type="tuple"> contains a child node that is not valid in that context.Fix: Use only valid child nodes inside list/tuple fields.
Default severity: ErrorMessage: text content is not allowed on a value that contains a file attributeA <field> or <value> node has both a file attribute and text content. These are mutually exclusive.Fix: Remove either the file attribute or the text content.
Default severity: ErrorMessage: text content is not allowed on a field with {0} attributeA <field> node has both a ref, eval, or search attribute and text content. These are mutually exclusive.Fix: Remove either the attribute or the text content.
Default severity: ErrorMessage: Invalid attribute {0} in field nodeThe attribute named in the message is not valid on a <field> node.Fix: Remove the invalid attribute.
Default severity: ErrorMessage: Fields only allow 'record' children nodesThe only permitted child nodes inside a <field> are <record> nodes (except for XML/HTML field types).Fix: Remove or replace the invalid child node.
Default severity: ErrorMessage: Model '{0}' not found in module '{1}' or its dependenciesThe model referenced by the model attribute of a <record> or <function> node is not declared in the current module or any of its declared dependencies.Fix: Add the module that declares the model to depends in your manifest.
Default severity: ErrorMessage: Model '{0}' not foundThe model name used in an XML node is not known to OdooLS at all.Fix: Check the model name for typos and ensure the declaring module is on an addon path.
Default severity: ErrorMessage: Field '{0}' not found in model '{1}'The field referenced in a <field name="..."> node does not exist on the specified model.Fix: Check the field name for typos or ensure the field is declared on the model (possibly via inheritance from a dependency module).

<value> node validation

Default severity: ErrorMessage: search attribute is not allowed when eval, type, file, or text content is presentThe search attribute on a <value> node is mutually exclusive with eval, type, file, and text content.Fix: Use only one value-providing mechanism per <value> node.
Default severity: ErrorMessage: eval attribute is not allowed when search, type, file, or text content is presentThe eval attribute on a <value> node is mutually exclusive with search, type, file, and text content.Fix: Use only one value-providing mechanism per <value> node.
Default severity: ErrorMessage: type attribute is not allowed when search or eval attribute is presentThe type attribute on a <value> node cannot be combined with search or eval.Fix: Remove the conflicting attribute.
Default severity: ErrorMessage: text content is not allowed on a value that contains a file attributeA <value> node has both a file attribute and text content. These are mutually exclusive.Fix: Remove either the file attribute or the text content.
Default severity: ErrorMessage: file attribute is not allowed when search or eval attribute is presentThe file attribute on a <value> node cannot be combined with search or eval.Fix: Remove the conflicting attribute.
Default severity: ErrorMessage: Invalid attribute {0} in value nodeThe attribute named in the message is not valid on a <value> node.Fix: Remove the invalid attribute.
Default severity: ErrorMessage: Empty Value data, text data or file attribute has to be provided when 'type' attribute is presentA <value> node has a type attribute but provides no content — neither text data nor a file attribute.Fix: Add text content or a file attribute to the <value> node.
Default severity: ErrorMessage: Empty Value data, one of text data, 'file', 'eval', or 'search' has to be providedA <value> node contains no data at all — no text, no file, no eval, and no search.Fix: Provide content via one of the accepted mechanisms.

<delete> node validation

Default severity: ErrorMessage: delete node must contain a model attributeA <delete> node is missing the required model attribute.Fix: Add model="your.model.name" to the <delete> node.

<report> node validation

Default severity: ErrorMessage: report node must contain a {0} attributeA <report> node is missing one of its required attributes: string, model, or name.Fix: Add the missing required attribute to the <report> node.
Default severity: ErrorMessage: Invalid attribute {0} in report nodeThe attribute named in the message is not valid on a <report> node.Fix: Remove the invalid attribute.
Default severity: ErrorMessage: report node cannot have text contentA <report> node contains text content, which is not permitted.Fix: Remove the text content from the <report> node.
Default severity: ErrorMessage: binding_views attribute must be a comma-separated list of view types matching ^([a-z]+(,[a-z]+)*)?$, found {0}The binding_views attribute on a <report> node does not match the required pattern: a comma-separated list of lowercase view type names.Fix: Use a value like "list,form" or "tree". Each part must be lowercase letters only.

<function> node validation

Default severity: ErrorMessage: function node must contain a {0} attributeA <function> node is missing a required attribute (model or name).Fix: Add the missing attribute to the <function> node.
Default severity: ErrorMessage: function node cannot have value children when eval attribute is presentA <function> node uses eval and also has <value> child nodes. These are mutually exclusive.Fix: Remove either the eval attribute or the <value> children.
Default severity: ErrorMessage: Invalid attribute {0} in function nodeThe attribute named in the message is not valid on a <function> node.Fix: Remove the invalid attribute.
Default severity: ErrorMessage: function node cannot have function children when eval attribute is presentA <function> node uses eval and also contains nested <function> elements. These are mutually exclusive.Fix: Remove either the eval attribute or the nested <function> children.
Default severity: ErrorMessage: Invalid child node {0} in function nodeA <function> node contains a child node that is not valid in that context.Fix: Remove the invalid child node.

Build docs developers (and LLMs) love