About | Installation | Usage | Contributing | Release Notes | Credits
This extension contains code snippets for Odoo to help you to develop Odoo modules faster and with no Typing Errors.
All snippets follow the OCA Maintainer Guidelines and are made to Odoo version 10.0
, 11.0
and 12.0
.
To OpenERP snippets, please use the TheDavidDelta's OpenERP Code Snippets extension.
Launch Quick Open
Paste the following command and press Enter
:
ext install mstuttgart.odoo-snippets
This extension provide support to following languages (file extensions):
- Python (.py)
- XML (.xml)
Below is a list of all available snippets.
Python snippets
Snippet | Description |
---|---|
oman |
Create Odoo Manifest |
omod |
Create New Odoo Model |
omodi |
Inherit Existing Odoo Model |
owiz |
Create New Odoo wizard |
owizi |
Inherit Existing Odoo wizard |
omodt |
Create Test to Odoo Model |
ofbin |
Add new field Binary |
ofbool |
Add new field Boolean |
ofchar |
Add new field Char |
ofdate |
Add new field Date |
oftime |
Add new field DateTime |
offloat |
Add new field Float |
ofhtml |
Add new field HTML |
ofint |
Add new field Integer |
oftxt |
Add new field Text |
ofsel |
Add new field Selection |
ofm2o |
Add new field Many2one |
ofm2m |
Add new field Many2many |
ofo2m |
Add new field One2many |
omcreate |
Add a method create |
omwrite |
Add a method write |
omunlink |
Add a method unlink |
omcomp |
Add a method compute |
omchange |
Add a method onchange |
XML and Report snippets
Snippet | Description |
---|---|
odoo |
Create Odoo Tag |
oform |
Create Form View |
oformi |
Inherit Existing Form View |
otree |
Create Tree View |
otreei |
Inherit Existing Tree View |
osearch |
Create Search View |
osearchi |
Inherit Existing Search View |
ograph |
Create Graph View |
ographi |
Inherit Existing Graph View |
opivot |
Create Pivot View |
opivoti |
Inherit Existing Pivot View |
okanban |
Create Kanban View |
okanbani |
Inherit Existing Kanban View |
ocalendar |
Create Calendar View |
ocalendari |
Inherit Existing Calendar View |
ogantt |
Create Gantt View |
ogantti |
Inherit Existing Gantt View |
oxpath |
Add the structure of xpath |
oxpathattr |
Add the structure of xpath to attributes |
oact |
Create new Action |
onote |
Add notebook and page tags |
opage |
Add new page tag |
omenur |
Create New Menu Item in the Upper bar |
omenuc |
Create New Menu Item for Categories |
omenua |
Create New Menu Item for Actions |
ocron |
Add a ir.cron record (11.0 version) |
obtn |
Add Odoo button |
obtnbox |
Add Button Box on View |
ogroup |
Add group tag on View |
ofield |
Add Field on View |
odata |
Add data tag on View |
oreport |
Create report record on View |
otemplate |
Create template tag |
otemplatei |
Create template inherit tag |
otcall |
Add t-call tag on View |
otforeach |
Add t-foreach tag on View |
otif |
Add t-if tag on View |
otraw |
Add t-raw tag on View |
otesc |
Add t-esc tag on View |
otset |
Add t-set tag on View |
otfield |
Add t-field tag on View |
otimg |
Add img tag with t-att-src attribute on View |
Please, see contributing guidelines here.
See changelog.
This snippets are based in odoo-pycharm-templates project.
Copyright (C) 2018-2021 by Michell Stuttgart