VSCode Flectra Snippets
Develop Flectra modules faster and with no Typing Errors
About |
Installation |
Usage |
Contributing |
Release Notes |
Credits
About
This extension contains code snippets for Flectra to help you to develop Flectra modules faster and with no Typing Errors.
All snippets follow the OCA Maintainer Guidelines and are made to Flectra version 12.0
+.
Installation
Launch Quick Open
Paste the following command and press Enter
:
ext install jamotion.flectra-snippets
Usage
This extension provide support to following languages (file extensions):
- Python (.py)
- XML (.xml)
- CSV (.csv)
Use tab
to navegate in snippet positions:
Below is a list of all available snippets.
Python snippets
Python Snippet |
Description |
ipdb |
Import Python ipdb command |
Flectra Snippet |
Description |
oman |
Create Flectra Manifest |
omod |
Create New Flectra Model |
omodi |
Inherit Existing Flectra Model |
owiz |
Create New Flectra wizard |
owizi |
Inherit Existing Flectra wizard |
omodt |
Create Test to Flectra 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 |
ousercomp |
Add self.user.company_id snippets |
oimp |
Add Flectra import snippets |
oimpt |
Add Import to Flectra Tests snippets |
oimper |
Add Import to Flectra Exceptions snippets |
XML snippets
XML Snippet |
Description |
flectra |
Create Flectra 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 |
obtn |
Add Flectra button |
obtnbox |
Add Button Box on View |
ogroup |
Add group tag on View |
ofield |
Add Field on View |
odata |
Add data tag on View |
ochatter |
Add chatter tag on View |
oaurl |
Create action.url tag |
oaserver |
Create action.server tag |
oaclient |
Create action.client tag |
Qweb Snippet |
Description |
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 |
otelif |
Add t-elif tag on View |
otifelse |
Add t-if-else 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 |
CSV snippets
CSVSnippet |
Description |
ocolumns |
Create columns to access groups |
flectra_access_entry |
Create entry to access groups |
Contributing
Please, see contributing guidelines here.
Release Notes
See changelog.
Credits
This snippets are based in flectra-pycharm-templates project.
Copyright (C) 2018-2023 by Michell Stuttgart