Usage Guide
Welcome to the cybrosys assista odoo helper usage guide for PyCharm. This document walks you through the core features that streamline your Odoo development workflow: module generation, file creation, and code inspection.
1. Module Template Generator
The Module Template Generator automates the creation of new Odoo modules by generating a complete, ready-to-use module structure. It sets up the base directory with all necessary subfolders and files such as models, views, security configurations, and initialization scripts.
How to Use
- Right-click on your target folder in the PyCharm project explorer.
- Navigate to Odoo Module Templates in the context menu.
- Select the desired module template:
- Basic Odoo Module
- Advanced Odoo Module
- OWL Basic Module
- OWL Advanced Module
- Theme Module
- Systray Module
- Enter the name of your new module and press Enter.
What Gets Generated
- Standard Odoo folder structure
- Models, views, security, and data files
__init__.py
and__manifest__.py
- Sample code for rapid prototyping
Module Type | Description |
---|---|
Basic Odoo Module | Minimal module with essential files (__init__.py , __manifest__.py ), simple example model, basic CRUD methods, form and tree views, minimal security, and standard folder layout. Ideal for prototypes, learning, or simple modules. |
Advanced Odoo Module | Comprehensive module with complex models (multiple field types, mixins), diverse views (form, tree, kanban, calendar), advanced XML templates, enhanced security (groups, record rules), demo data, scheduled actions, website/static asset support, and full documentation. Suitable for production and team projects. |
Theme Module | Website theme scaffold with QWeb templates, folders for CSS, JS, images, fonts, and asset bundles. Includes sample snippets and optional demo data. Perfect for reusable website themes and design components. |
OWL Basic Module | Minimal OWL (Odoo Web Library) module with example JS/TS components, templates, manifest entries for JS/CSS loading, and QWeb integration. Great for simple widgets, buttons, and UI enhancements. |
OWL Advanced Module | Rich OWL module scaffold featuring multiple components, parent-child relationships, state management, advanced asset bundles, backend controllers, QWeb templates, demo UI data, and documentation. Ideal for interactive dashboards and client features. |
Systray Module | Adds custom icons and menus to the Odoo web client's systray (top-right bar). Includes example OWL/JS systray components, QWeb templates, manifest setup, backend controllers, and lightweight model/controller logic. Useful for notifications, quick actions, and systray utilities. |
2. Odoo File Creator
Manually creating files and boilerplate code slows down development. The Odoo File Creator lets you instantly generate specific Odoo files—Python, XML, and CSV—with pre-filled, context-aware templates tailored for Odoo modules.
How to Use
- Right-click on the folder where you want the new file.
- Select New → New Odoo File.
- Choose the file type: Python, XML, or CSV.
- Select the desired content template (e.g., Model, Controller, Report XML).
- Name the file and press Enter.
Supported File Types & Templates
Python Files
Template | Description |
---|---|
__init__.py | Basic initialization file with encoding and import placeholders to set up the module structure. |
__manifest__.py | Ready-to-edit manifest file with standard metadata such as name, version, category, and dependencies. |
Odoo Model | Model definition file with required imports, a sample model class, fields, and a basic create method example. |
Odoo Controller | Controller file including imports, a controller class, and a sample @http.route method for web or API endpoints. |
XML Files
Template | Description |
---|---|
Empty XML | Blank XML file for any custom configurations or advanced use cases. |
Basic View XML | Minimal form or tree view definition for models. |
Advanced View XML | Complex views featuring groups, notebooks, statusbars for richer UI layouts. |
Inherited View XML | Template to extend existing views safely using <xpath> . |
Report XML | Printable report templates and actions for PDF/HTML output. |
Menu XML | Menu items and navigation hierarchy definitions. |
Action XML | ir.actions.act_window records to link menus with views. |
Settings XML | Custom settings templates for Odoo config panels. |
Cron Job XML | Scheduled actions for recurring background jobs. |
Security XML | Access control lists and group definitions. |
CSV Files
Template | Description |
---|---|
Security File | CSV defining access control rules with model names, groups, and permissions (read, write, create, delete). |
3. Odoo Code Snippet Assistant
The Odoo Code Snippet Assistant streamlines development by providing a curated collection of reusable code snippets accessible through simple keywords. It supports both Python and XML, covering common patterns such as model definitions, view templates, actions, and security rules. This feature enhances productivity, reduces boilerplate, and promotes best practices across your Odoo modules.
How to Use the Odoo Code Snippet Assistant
Writing frequent Odoo code blocks is now faster and more consistent with the help of Assista:
type odoo in either an XML or Python file, and Assista will display a list of available code snippets along with their descriptions. Select a snippet from the list or type the keyword and press Enter to automatically insert the predefined code block.
Additionally, when inserting snippets related to views, actions, menus, or security rules, the plugin intelligently detects your model context and automatically fills in model names, record IDs, and XML record structures. This ensures consistency and adherence to naming conventions across your module, reducing manual errors and saving valuable development time.
This feature allows you to scaffold commonly used Odoo constructs in seconds, reducing repetitive tasks and ensuring adherence to best practices across your module development.
4. Smart Suggestion Plugin for Odoo Development
Smart Suggestion is a powerful plugin designed to enhance the Odoo development experience by offering intelligent, context-aware code completions. It significantly improves productivity and reduces errors by suggesting relevant model names, field names, and class attributes based on the context in both Python and XML files.
Key Features
- Context-aware completions for common Odoo patterns.
- Auto-suggestions for model and field names in both Python and XML.
- Reduces manual errors and accelerates development workflows.
- Compatible with Odoo’s ORM, API decorators, and XML view definitions.
Suggestion Scope
Python
The plugin provides intelligent completions in the following Python contexts:
Model Names in
_inherit
Suggests existing model names to extend.Model Names in
comodel_name
(One2many/Many2one/Many2many fields)
Currently supports positional arguments for relational fields.Model Names inside
env["..."]
Autocompletes model names when accessing models through the environment.inverse_name
in One2many Fields
Suggests relational fields from thecomodel_name
.Field Names in Decorators
@api.depends("field1", "field2", ...)
@api.onchange("field1")
@api.constrains("field1", "field2")
Record Traversals
When accessing records (e.g.,record.field
), first-level relational fields are suggested.
XML
The plugin supports completions in key XML use cases, such as:
Model Names in
<record>
Tags
Auto-suggests values for themodel
attribute.Model Names in
<field>
Tags
For attributes likename
andmodel
, including usage inres_model
.Field Names in
<field>
Tags
Suggests appropriate field names based on the model context.
Benefits
- Streamlines Odoo development by reducing boilerplate.
- Prevents common typos and reference errors.
- Saves time and improves code reliability.
- Especially useful for both new and experienced Odoo developers.
5. Odoo Standard Inspection
The plugin includes built-in inspection tools that help maintain code quality and adherence to Odoo development standards. It works across Python, XML, and CSV files to detect common mistakes and enforce best practices.
Features
- Inspects model definitions, field declarations, and API decorators.
- Checks XML
<record>
and<view>
structures. - Highlights issues inline with error messages and suggestions.
For additional help, visit our Troubleshooting page or contact our support team.