odoo-18
Audited by Runlayer on Feb 23, 2026
Malicious tool definition detected
Tool: AGENTS.md Description: # Odoo 18 Documentation - AI Agents Setup Setup guide for using Odoo 18 documentation with AI coding assistants (Cursor, Claude Code, OpenCode, etc.).
Malicious tool definition detected
Tool: CLAUDE.md Description: # Odoo 18 Development Guide This file provides guidance to AI agents when working with Odoo 18 code in this repository.
Malicious tool definition detected
Tool: SKILL.md [1/2] Description: --- name: odoo-18 description: Master index for Odoo 18 guides.
Tool: SKILL.md [2/2]
Malicious tool definition detected
Tool: dev/odoo-18-actions-guide.md [1/2] Description: --- name: odoo-18-actions description: Complete reference for Odoo 18 actions (ir.actions.*).
Tool: dev/odoo-18-actions-guide.md [2/2] Description: ```xml <record model="ir.actions.server" id="multi_action"> <field name="name">Multi Action</field> <field name="model_id" ref="model_res_partner"/> <field name="state">multi</field> <field name="child_ids" eval="[ ref('action_create'), ref('action_notify'), ]"/> </record> ``` ### Evaluation Context Available variables in server action code: | Variable | Description | |----------|-------------| | `model` | Model object linked via `model_id` |
Malicious tool definition detected
Tool: dev/odoo-18-controller-guide.md [1/2] Description: --- name: odoo-18-controller description: Complete reference for Odoo 18 HTTP controllers, routing, authentication types, and request/response handling.
Tool: dev/odoo-18-controller-guide.md [2/2] Description: odoo.http import request class WebsiteController(http.Controller): @http.route('/shop', type='http', auth='public', website=True) def shop(self, **kwargs): """Website shop page""" products = request.env['product.product'].search([ ('website_published', '=', True), ('sale_ok', '=', True), ]) # Get cart cart = request.website.sale_get_order() return request.render('website_shop.shop', { 'products': products, 'cart': cart, }) @http.route('/sh
Malicious tool definition detected
Tool: dev/odoo-18-data-guide.md [1/3] Description: --- name: odoo-18-data description: Complete reference for Odoo 18 data files covering XML data files, CSV data files, record tags, field tags, shortcuts (menuitem, template, asset), function tags, delete tags, and noupdate attribute.
Tool: dev/odoo-18-data-guide.md [2/3]
Tool: dev/odoo-18-data-guide.md [3/3]
Malicious tool definition detected
Tool: dev/odoo-18-decorator-guide.md [1/2] Description: --- name: odoo-18-decorator description: "Complete reference for Odoo 18 API decorators (@api.model, @api.depends, @api.constrains, @api.onchange, @api.ondelete, @api.returns) and their proper usage patterns." globs: "**/models/**/*.py" topics: - api.model (model-level methods) - api.depends (computed fields) - api.depends_context (context-dependent computed fields) - api.constrains (data validation) - api.onchange (form UI updates) - api.o
Tool: dev/odoo-18-decorator-guide.md [2/2] Description: can be deleted.") ``` **`at_uninstall` parameter**: | Value | Behavior | |-------|----------| | `False` (default) | Check runs during normal use, NOT during module uninstall | | `True` | Check runs always, including during module uninstall | **When to use `at_uninstall=True`**: - System-critical data (default language, main company) - Data that would break basic functionality if deleted ```python # Example: Prevent deleting default language
Malicious tool definition detected
Tool: dev/odoo-18-development-guide.md [1/4] Description: --- name: odoo-18-development description: Complete guide for Odoo 18 module development covering manifest structure, security, reports, wizards, data files, hooks, and exception handling.
Tool: dev/odoo-18-development-guide.md [2/4]
Tool: dev/odoo-18-development-guide.md [3/4] Description: 'Step 3'), ], default='step1') field1 = fields.Char(string='Field 1') field2 = fields.Char(string='Field 2') field3 = fields.Char(string='Field 3') def action_next(self): if self.step == 'step1': self.write({'step': 'step2'}) elif self.step == 'step2': self.write({'step': 'step3'}) return { 'type': 'ir.actions.act_window', 'res_model': 'multi.step.wizard', 'res_id': self.id, 'view_mode': 'form', 'target': 'new', } ``` ### Wizard with Cont
Tool: dev/odoo-18-development-guide.md [4/4]
Malicious tool definition detected
Tool: dev/odoo-18-field-guide.md [1/3] Description: --- name: odoo-18-field description: Complete reference for Odoo 18 field types, parameters, and when to use each.
Tool: dev/odoo-18-field-guide.md [2/3] Description: Typed Reference (Odoo 18) ```python # Many2oneReference - model stored in separate field ref_id = fields.Many2oneReference( string='Reference', model_field='model_name', # Char field containing model name ) # Example usage class MyModel(models.Model): _name = 'my.model' model_name = fields.Char(string='Model Name') # Stores model name ref_id = fields.Many2oneReference( string='Reference', model_field='model_name' ) # Usage: ref_id can point to
Tool: dev/odoo-18-field-guide.md [3/3] Description: Terms', company_dependent=True, ) # Access for specific company record.with_context(company_id=1).payment_term_id ``` --- ## Odoo 18 Field Parameters ### aggregator (Odoo 18) **Replaces**: `group_operator` (deprecated since Odoo 18) ```python # Odoo 18+ - use aggregator amount = fields.Float( string='Amount', aggregator='sum', # NEW in Odoo 18 ) # Supported aggregators (from READ_GROUP_AGGREGATE): # - sum, avg, max, min # - bool_and, bool_or #
Malicious tool definition detected
Tool: dev/odoo-18-manifest-guide.md [1/2] Description: --- name: odoo-18-manifest description: Complete reference for Odoo 18 module manifest (__manifest__.py) covering all fields, dependencies, assets, external dependencies, hooks, auto_install, and module structure.
Tool: dev/odoo-18-manifest-guide.md [2/2] Description: | | `web.assets_tests` | Test assets | | `web.assets_common` | Common assets (rarely used) | ### Asset Paths ```python 'assets': { 'web.assets_frontend': [ # JavaScript files 'my_module/static/src/js/module.js', 'my_module/static/src/xml/component.xml', # OWL templates # CSS/SCSS files 'my_module/static/src/scss/main.scss', 'my_module/static/src/css/custom.css', # External files (rare) 'https://cdn.example.com/library.js', ], } ``` ### Modul
Malicious tool definition detected
Tool: dev/odoo-18-migration-guide.md [1/3] Description: --- name: odoo-18-migration description: Comprehensive guide for upgrading modules and data to Odoo 18, including migration scripts, upgrade hooks, deprecations, and best practices.
Tool: dev/odoo-18-migration-guide.md [2/3] Description: Script Template ```python # File: odoo/upgrade_code/18.0-01-example.py def upgrade(file_manager): """ Upgrade script for transforming source code.
Tool: dev/odoo-18-migration-guide.md [3/3]
Malicious tool definition detected
Tool: dev/odoo-18-mixins-guide.md [1/3] Description: --- name: odoo-18-mixins description: Complete reference for Odoo 18 mixins and useful classes.
Tool: dev/odoo-18-mixins-guide.md [2/3] Description: | Description | |-------|-------------| | `alias_name` | Email alias name (e.g., 'jobs' for jobs@example.com) | | `alias_user_id` | Owner of created records | | `alias_defaults` | Python dict of default values | | `alias_force_thread_id` | If set, all messages go to this thread | | `alias_contact` | Who can post: `everyone`, `partners`, `followers` | | `alias_domain` | Email domain (automatic from system) | ### message_new() - Handle Incoming
Tool: dev/odoo-18-mixins-guide.md [3/3]
Malicious tool definition detected
Tool: dev/odoo-18-model-guide.md [1/4] Description: --- name: odoo-18-model description: Complete reference for Odoo 18 ORM model methods, CRUD operations, domain syntax, and recordset handling.
Tool: dev/odoo-18-model-guide.md [2/4] Description: ```python # _read_group() - Core method with simpler API for partner, total, count in self._read_group( domain=[('state', '=', 'done')], groupby=['partner_id'], aggregates=['amount_total:sum', '__count'], ): print(f"{partner.name}: {total} ({count} orders)") # read_group() - Public API with metadata for UI data = self.read_group( domain=[('state', '=', 'done')], fields=['amount_total'], groupby=['partner_id'], lazy=True, ) # Can use __domain fo
Tool: dev/odoo-18-model-guide.md [3/4] Description: month, quarter, year ) ``` **Supported Date Granularities**: | Granularity | Type | Use Case | |-------------|------|----------| | `year_number` | Integer | Year number (2024, 2025, ...) | | `quarter_number` | Integer | Quarter number (1-4) | | `month_number` | Integer | Month number (1-12) | | `iso_week_number` | Integer | ISO week number (1-53) | | `day_of_year` | Integer | Day of year (1-366) | | `day_of_month` | Integer | Day of month (1-31
Tool: dev/odoo-18-model-guide.md [4/4]
Malicious tool definition detected
Tool: dev/odoo-18-owl-guide.md [1/4] Description: --- name: odoo-18-owl description: Complete reference for Odoo 18 OWL (Owl Web Library) components, hooks, services, and patterns for building interactive JavaScript UI components.
Tool: dev/odoo-18-owl-guide.md [2/4]
Tool: dev/odoo-18-owl-guide.md [3/4] Description: }); // Get from registry const viewDef = viewRegistry.get("my_view"); // Check existence if (viewRegistry.contains("my_view")) { // ...
Tool: dev/odoo-18-owl-guide.md [4/4] Description: "@web/core/dropdown/dropdown_item"; import { TagsList } from "@web/core/tags_list/tags_list"; export class PartnerList extends Component { static template = "myaddon.PartnerList"; static components = { Dropdown, DropdownItem, TagsList }; static props = { domain: { type: Array, optional: true }, limit: { type: Number, optional: true }, }; static defaultProps = { domain: [], limit: 80, }; setup() { this.orm = useService("orm"); this.notification =
Malicious tool definition detected
Tool: dev/odoo-18-performance-guide.md [1/3] Description: --- name: odoo-18-performance description: Complete guide for writing performant Odoo 18 code, focusing on N+1 query prevention, batch operations, and optimization patterns.
Tool: dev/odoo-18-performance-guide.md [2/3] Description: Wrapper that calls `_read_group()` | | Use case | Data processing, internal logic | UI components, reports | **Key Insight**: `_read_group()` is the **core method** that `read_group()` calls internally (see `odoo/models.py:2888`).
Tool: dev/odoo-18-performance-guide.md [3/3] Description: # BAD: Compute method does expensive operation @api.depends('order_id') def _compute_order_total(self): for line in self: # Search in loop - N queries line.order_total = self.search_count([ ('order_id', '=', line.order_id.id) ]) ``` ### Anti-Pattern 3: Not using exists() ```python # BAD: Fetches all records records = self.search([('state', '=', 'done')]) if len(records) > 0: # ...
Malicious tool definition detected
Tool: dev/odoo-18-reports-guide.md [1/3] Description: --- name: odoo-18-reports description: Complete reference for Odoo 18 QWeb reports covering PDF/HTML reports, report templates, paper formats, custom reports, custom fonts, translatable templates, barcodes, and report actions.
Tool: dev/odoo-18-reports-guide.md [2/3] Description: - | | `margin_bottom` | Bottom margin in mm | - | | `margin_left` | Left margin in mm | - | | `margin_right` | Right margin in mm | - | | `header_line` | Show header line | False | | `header_spacing` | Space before header | - | | `dpi` | Output DPI | 90 | ### Predefined Formats A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10 B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10 Letter, Legal, Tabloid ### Custom Paper Format ```xml <record id="paperformat_f
Tool: dev/odoo-18-reports-guide.md [3/3]
Malicious tool definition detected
Tool: dev/odoo-18-security-guide.md [1/3] Description: --- name: odoo-18-security description: Complete reference for Odoo 18 security covering access rights (ACL), record rules, field-level access, security pitfalls, SQL injection prevention, XSS prevention, and safe coding practices.
Tool: dev/odoo-18-security-guide.md [2/3] Description: <record id="rule_company" model="ir.rule"> <field name="name">User Company</field> <field name="model_id" ref="model_business_trip"/> <field name="domain_force">[('company_id', 'in', user.company_ids)]</field> <field name="global" eval="True"/> </record> <!-- Result: Records must be BOTH active AND in user's company --> ``` ```xml <!-- Group Rule: Employees see own records --> <record id="rule_employee_own" model="ir.rule"> <field name="name
Tool: dev/odoo-18-security-guide.md [3/3] Description: k in allowed} self.write(updates) ``` ### 10.
Malicious tool definition detected
Tool: dev/odoo-18-testing-guide.md [1/3] Description: --- name: odoo-18-testing description: Comprehensive guide for testing Odoo 18 modules, including TransactionCase, HttpCase, browser testing, and best practices.
Tool: dev/odoo-18-testing-guide.md [2/3] Description: The `Form` class provides server-side form view simulation with onchange support.
Tool: dev/odoo-18-testing-guide.md [3/3] Description: Use Form for UI-like Testing ```python def test_create_record(self): """Test with form simulation.""" with Form(self.env['sale.order']) as f: f.partner_id = self.partner with f.order_line.new() as line: line.product_id = self.product # Automatically saved and onchange triggered order = f.save() self.assertTrue(order.order_line) ``` ### 5.
Malicious tool definition detected
Tool: dev/odoo-18-transaction-guide.md [1/3] Description: --- name: odoo-18-transaction description: Complete guide for handling database transactions, UniqueViolation errors, savepoints, and commit operations in Odoo 18.
Tool: dev/odoo-18-transaction-guide.md [2/3] Description: progress ``` ### When NOT to Use commit() ```python # BAD: Commit inside normal business logic @api.model def create_order(self, values): order = self.create(values) self.env.cr.commit() # DON'T DO THIS!
Tool: dev/odoo-18-transaction-guide.md [3/3] Description: If yes, transaction is fine - [ ] Do I need to execute more queries?
Malicious tool definition detected
Tool: dev/odoo-18-translation-guide.md [1/3] Description: --- name: odoo-18-translation description: Complete guide for Odoo 18 translations and localization.
Tool: dev/odoo-18-translation-guide.md [2/3] Description: This file contains the French translations msgid "" msgstr "" "Project-Id-Version: Odoo Server 18.0 " "Report-Msgid-Bugs-To: " "POT-Creation-Date: 2024-01-01 12:00+0000 " "PO-Revision-Date: 2024-01-01 12:00+0000 " "Last-Translator: " "Language-Team: " "Language: fr_FR " "MIME-Version: 1.0 " "Content-Type: text/plain; charset=UTF-8 " "Content-Transfer-Encoding: 8bit " #.
Tool: dev/odoo-18-translation-guide.md [3/3]
Malicious tool definition detected
Tool: dev/odoo-18-view-guide.md [1/3] Description: --- name: odoo-18-view description: Complete reference for Odoo 18 XML views, actions, menus, and QWeb templates.
Tool: dev/odoo-18-view-guide.md [2/3] Description: Make field required conditionally | `required="is_company"` | | `column_invisible` | Hide list column | `column_invisible="True"` | ### Context / Domain ```xml <!-- Context / Domain --> <field name="product_id" context="{'default_type': 'service'}"/> <field name="partner_id" domain="[('supplier_rank', '>', 0)]"/> <!-- Class --> <field name="phone" class="o_force_ltr"/> ``` --- ## Search View ### Basic Search View ```xml <record id="view_my_model
Tool: dev/odoo-18-view-guide.md [3/3] Description: string="State" name="state" context="{'group_by': 'state'}"/> <filter string="User" name="user" context="{'group_by': 'user_id'}"/> </group> </search> </field> </record> <!-- KANBAN VIEW --> <record id="view_my_module_kanban" model="ir.ui.view"> <field name="name">my.module.kanban</field> <field name="model">my.module</field> <field name="arch" type="xml"> <kanban default_group_by="state"> <field name="name"/> <field name="state"/> <templates> <