# OdooParser

**Kind:** Class

**Source:** [`atloria-monorepo/libs/parser-core/src/parsers/backend/odoo.parser.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/parser-core/src/parsers/backend/odoo.parser.ts#L70)

**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

- `OdooParser` stops the work with an early return when `!/\.py$/.test(normalized)`.
- `OdooParser` stops the work with an early return when `/(^|\/)(__pycache__|node_modules|\.venv|venv|site-packages)\//.test(normalized)`.
- `OdooParser` stops the work with an early return when `/(^|\/)tests?\//.test(normalized) || /(^|\/)test_[^/]*\.py$/.test(normalized)`.
- `OdooParser` stops the work with an early return when `cached !== undefined`.
- `OdooParser` stops the work with an early return when `!isOdooControllerSource(source)`.

## When something fails

- `OdooParser` handles failure in 2 places: it logs it and continues in 1, and turns it into a return value in 1.
