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
| Method | Signature | Returns |
|---|---|---|
initialize | initialize(_config: ParserConfig) | Promise<void> |
canParse | canParse(filePath: string) | boolean |
parseFile | parseFile(filePath: string, content: string) | Promise<ParseResult> |
parseFiles | parseFiles(files: ParseFileInput[]) | Promise<ParseResult[]> |
destroy | destroy() | Promise<void> |
Properties
| Property | Type |
|---|---|
name | any |
version | any |
supportedPatterns | any |
Where it refuses work
OdooXmlParserstops the work with an early return when!fileContent.trim().OdooXmlParserstops the work with an early return whentypeof states === 'string'.OdooXmlParserstops the work with an early return whenfs.existsSync(${dirPath}/manifest.py) || fs.existsSync(${dirPath}/openerp.py).OdooXmlParserstops the work with an early return wheni + 1 < segments.length.
When something fails
OdooXmlParserhandles 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?