Skip to content

OdooXmlParser

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/libs/parser-core/src/parsers/backend/odoo-xml.parser.ts

Odoo XML View Parser Extracts UI elements, views, actions, and menus from Odoo XML files

Implements: IParser

Methods

MethodSignatureReturns
initializeinitialize(_config: ParserConfig)Promise<void>
canParsecanParse(filePath: string)boolean
parseFileparseFile(filePath: string, content: string)Promise<ParseResult>
parseFilesparseFiles(files: ParseFileInput[])Promise<ParseResult[]>
destroydestroy()Promise<void>

Properties

PropertyType
nameany
versionany
supportedPatternsany

Where it refuses work

  • OdooXmlParser stops the work with an early return when !fileContent.trim().
  • OdooXmlParser stops the work with an early return when typeof states === 'string'.
  • OdooXmlParser stops the work with an early return when fs.existsSync(${dirPath}/manifest.py) || fs.existsSync(${dirPath}/openerp.py).
  • OdooXmlParser stops the work with an early return when i + 1 < segments.length.

When something fails

  • OdooXmlParser handles failure in 2 places: it turns it into a return value in 1, and discards it silently in 1. A failure discarded silently leaves no trace for whoever debugs this later.

Was this page helpful?

Download as PDF