Skip to content

Quick Start Guide

This guide provides a quick overview of the Cybrosys Assista PyCharm plugin's key features to help you get started with Odoo development.

Core Features Overview

1. Module Template Generator

Create complete Odoo modules with a single click using pre-configured templates:

How to Use:

  • Right-click in project explorer
  • Select Odoo Module Templates
  • Choose from 6 template types:
    • Basic Odoo Module: Minimal structure for prototypes and learning
    • Advanced Odoo Module: Comprehensive setup for production projects
    • OWL Basic Module: Simple JavaScript/TypeScript components
    • OWL Advanced Module: Rich OWL with state management
    • Theme Module: Website themes with QWeb templates
    • Systray Module: Custom systray components and menus
  • Enter module name and press Enter

What Gets Generated:

  • Complete folder structure (models, views, security, data)
  • Pre-configured __init__.py and __manifest__.py
  • Sample models with fields and methods
  • Basic CRUD operations and views
  • Security access rights and groups
  • Demo data for testing (Advanced templates)

Time Savings: Complete module setup in 30 seconds vs 15-30 minutes manually


module_template_generator

2. File Creator

Generate Odoo-specific files instantly with context-aware templates:

How to Use:

  • Right-click → New → New Odoo File
  • Select file type:
    • Python: Models, controllers, __init__.py, __manifest__.py
    • XML: Views, reports, data files, QWeb templates
    • CSV: Security access rights, import/export data
  • Choose from pre-configured templates
  • Name your file and press Enter

Python Templates:

  • __init__.py: Basic initialization file with encoding and import placeholders
  • __manifest__.py: Ready-to-edit manifest with standard metadata and dependencies
  • Odoo Model: Model definition with imports, class structure, fields, and basic CRUD methods
  • Odoo Controller: Controller file with HTTP route decorators and request handling

XML Templates:

  • Empty View: Blank view template for custom development
  • Basic View: Simple view with standard fields and layout
  • Advanced View: Complex view with groups, tabs, and advanced features
  • Inherit View: View inheritance template for extending existing views
  • Report View: QWeb report template with layout and styling
  • Security Group View: Security group definitions and access rights
  • Security Rule View: Record rules and domain-based access control
  • Sequence View: Sequence and numbering configurations
  • Settings View: Module settings and configuration options
  • Cron Job View: Scheduled action and automation templates

CSV Templates:

  • Security Access: Model access rights and permissions

Smart Features:

  • Auto-updates __init__.py and __manifest__.py
  • Context-aware file placement
  • Pre-filled imports and boilerplate code
  • Follows Odoo naming conventions
  • Automatic dependency management
  • Template-specific field suggestions

file_creator_menu


3. Code Snippets

Access common Odoo code patterns with intelligent snippet suggestions:

How to Use:

  • Type odoo in Python or XML files
  • Browse through categorized snippets
  • Select desired snippet from the list
  • Press Enter to insert the code

Python Snippets:

  • Fields: All field types (Char, Text, Float, Integer, Selection, Date, Datetime, Many2one, One2many, Many2many, Boolean, Html, Binary)
  • API Decorators: Model decorators (create_multi, depends, onchange, constrains, returns)
  • Imports: Common import statements (fields, models, api, tools, config, exceptions)
  • Exceptions: Error handling (UserError, ValidationError, AccessError, MissingError, RedirectWarning)
  • Model/Class Related: Model classes, inheritance, and class definitions
  • Methods: CRUD operations, computed fields, and onchange methods
  • Actions and Notifications: Window actions, notifications, and user feedback

XML Snippets:

  • Buttons and Actions: Object buttons, action buttons, smart buttons
  • Field Attributes: Domain filters, options, groups, widgets, visibility conditions
  • View Elements: Fields, labels, separators, chatter, notebooks, xpath expressions
  • View Templates: Form, list, search, kanban, pivot, calendar views
  • Menu Items: Root menus, category menus, action menus
  • Action Windows: Window actions, inherited views, Odoo tags

Smart Features:

  • Context-aware snippet suggestions
  • Auto-completion for field names and model references
  • Template variables for customization
  • Syntax highlighting and validation
  • Quick access to 100+ common Odoo patterns

Productivity Boost: Reduce typing by 70% with intelligent snippet insertion


code_snippet

4. Smart Suggestions

Get intelligent code completion with context-aware suggestions:

Python Suggestions:

  • Model Names: Auto-complete model names in _inherit, relational fields, and env[] access
  • Field Names: Suggest field names in API decorators (@api.depends, @api.onchange, @api.constrains)
  • Relational Fields: Complete field names in self.mapped() and record access

XML Suggestions:

  • Model References: Auto-complete model names in view definitions and actions
  • Field Names: Suggest available fields based on model context
  • Widgets: Suggest appropriate widgets for field types
  • CSS Classes: Auto-complete CSS classes declared in your project
  • Template Suggestions: Complete template names in <t t-call> tags

Context-Aware Features:

  • Model Context: Field suggestions adapt to the current model
  • Location Awareness: Suggestions based on file location in project structure
  • Dependency Tracking: Auto-complete module names in manifest dependencies

Productivity Benefits:

  • Reduced Typos: Prevents errors in model and field names
  • Faster Development: Quick access to available options
  • Learning Tool: Discover available models and fields
  • Consistency: Enforces proper naming conventions

Keyboard Shortcuts:

  • Ctrl+Space: Trigger suggestions
  • Tab: Accept suggestion
  • Esc: Dismiss suggestions

smart_suggestion

5. Code Inspection

Maintain code quality with comprehensive validation and real-time feedback:

Python File Inspections:

  • File Structure: UTF-8 encoding, import organization, manifest validation
  • Model Standards: Naming conventions, class definitions, field declarations
  • Field Conventions: Proper field naming (_id for Many2one, _ids for One2many/Many2many)
  • API Usage: Correct decorator usage, method signatures, parameter validation
  • Import Management: Proper import statements, dependency tracking
  • Documentation: Docstring requirements, comment standards

XML File Inspections:

  • View Structure: Proper view definitions, field references, model consistency
  • Security Validation: Access rights, record rules, group permissions
  • Cross-Reference Checks: Model and field existence validation
  • Attribute Standards: Proper widget usage, domain syntax, option formatting
  • Template Compliance: QWeb template standards, inheritance patterns

CSV File Inspections:

  • Access Control: Security file validation, permission syntax
  • Data Integrity: Record rule compliance, domain validation
  • Import/Export: Data format standards, field mapping validation

Validation Rules (70+):

  • 35+ Python Rules: Covering 14 categories from manifest to method validation
  • 25+ XML Rules: Spanning 15 categories with context-aware validation
  • 15+ CSV Rules: Focused on access control and data integrity
  • Real-time Feedback: Inline error highlighting with precise location reporting

Quick Fixes:

  • Automated Corrections: One-click fixes for common issues
  • Field Attribute Cleanup: Remove redundant field attributes

Quality Benefits:

  • Error Prevention: Catch issues before they become problems
  • Consistency Enforcement: Maintain team coding standards
  • Best Practice Compliance: Follow Odoo development guidelines
  • Reduced Review Time: Pre-validated code requires less review
  • Learning Tool: Understand Odoo conventions through feedback

Inspection Categories:

  • File Structure: Encoding, imports, manifest requirements
  • Naming Conventions: Model names, field names, method names
  • Field Definitions: Proper field types, attributes, relationships
  • API Usage: Decorator placement, method signatures
  • Security Standards: Access rights, record rules, permissions
  • View Compliance: XML structure, field references, model consistency
code_inspection

Getting Started Steps

1. Installation & Setup

  • Install Plugin: Install from PyCharm marketplace or download from JetBrains marketplace
  • Verify Installation: Type odoo in any Python file to test snippets
  • Configure Preferences: Set up Odoo path and development preferences
  • Restart PyCharm: Allow indexing to complete for optimal performance

2. Create Your First Module

  • Right-click in project explorer → Odoo Module Templates
  • Choose Template: Start with "Basic Odoo Module" for learning
  • Enter Module Name: Use descriptive name (e.g., my_first_module)
  • Review Generated Structure: Check models, views, security, and manifest files
  • Time Investment: 30 seconds vs 15-30 minutes manually

3. Add Files to Your Module

  • Generate Models: Right-click → New → New Odoo File → Python → Odoo Model
  • Create Views: Right-click → New → New Odoo File → XML → Basic View
  • Add Security: Generate access rights and record rules
  • Auto-Updates: __init__.py and __manifest__.py updated automatically

4. Write Code with Assistance

  • Use Snippets: Type odoo to access 100+ code patterns
  • Smart Completions: Get context-aware suggestions for fields and models
  • Real-time Validation: Code inspection highlights issues immediately
  • Quick Fixes: One-click corrections for common problems

5. Test and Validate

  • Check Code Quality: Review inspection results and apply quick fixes
  • Test Module: Install and test your module in Odoo
  • Iterate: Use feedback to improve code quality and functionality
  • Document: Add comments and docstrings for maintainability

6. Advanced Development

  • Explore Templates: Try Advanced, OWL, Theme, or Systray modules
  • Customize Views: Use different view templates (Form, List, Kanban, Calendar)
  • Add Features: Implement computed fields, onchange methods, and actions
  • Security: Configure access rights, groups, and record rules

Pro Tips:

  • Start with Basic Module template to learn the structure
  • Use snippets for common patterns instead of typing from scratch
  • Leverage smart suggestions to discover available fields and models
  • Follow code inspection feedback to maintain quality standards

Next Steps