2
2
<h1 align =" center " >
3
3
<br >
4
4
<a href =" https://marketplace.visualstudio.com/items?itemName=mstuttgart.odoo-snippets " >
5
- <img src =" https://github.com/mstuttgart/vscode-odoo-snippets/blob/develop /images/icon.png?raw=true " ></a >
5
+ <img src =" https://github.com/mstuttgart/vscode-odoo-snippets/blob/main /images/icon.png?raw=true " ></a >
6
6
<br >
7
7
VSCode Odoo Snippets
8
8
<br >
15
15
<img src="https://vsmarketplacebadge.apphb.com/version-short/mstuttgart.odoo-snippets.svg?style=flat-square&color=875A7B" alt="Version">
16
16
</a >
17
17
<a href =" https://marketplace.visualstudio.com/items?itemName=mstuttgart.odoo-snippets " >
18
- <img alt="Visual Studio Marketplace Installs" src="https://img.shields.io/visual-studio-marketplace/i/mstuttgart.odoo-snippets?color=875A7B&style=flat-square">
18
+ <img alt="Visual Studio Marketplace Installs" src="https://img.shields.io/visual-studio-marketplace/i/mstuttgart.odoo-snippets?color=875A7B&label=Installs& style=flat-square">
19
19
</a >
20
20
<a href =" https://marketplace.visualstudio.com/items?itemName=mstuttgart.odoo-snippets " >
21
- <img alt="Visual Studio Marketplace Downloads" src="https://img.shields.io/visual-studio-marketplace/d/mstuttgart.odoo-snippets?color=875A7B&style=flat-square">
21
+ <img alt="Visual Studio Marketplace Downloads" src="https://img.shields.io/visual-studio-marketplace/d/mstuttgart.odoo-snippets?color=875A7B&label=Downloads& style=flat-square">
22
22
</a >
23
23
<a href =" https://marketplace.visualstudio.com/items?itemName=mstuttgart.odoo-snippets " >
24
- <img src="https://vsmarketplacebadge.apphb.com/rating/mstuttgart.odoo-snippets.svg?style=flat-square&color=875A7B" alt="Ratings">
24
+ <img src="https://vsmarketplacebadge.apphb.com/rating/mstuttgart.odoo-snippets.svg?style=flat-square&color=875A7B&label=Rating " alt="Ratings">
25
25
</a >
26
26
</p >
27
27
38
38
39
39
This extension contains code snippets for [ Odoo] ( https://www.odoo.com ) to help you to develop Odoo modules faster and with no Typing Errors.
40
40
41
- All snippets follow the [ OCA Maintainer Guidelines] ( https://github.com/OCA/maintainer-tools/blob/master/CONTRIBUTING.md ) and are made to Odoo version ` 10.0 ` , ` 11.0 ` and ` 12.0 ` .
41
+ All snippets follow the [ OCA Maintainer Guidelines] ( https://github.com/OCA/maintainer-tools/blob/master/CONTRIBUTING.md ) and are made to Odoo version ` 12.0 ` + .
42
42
43
43
To ** OpenERP** snippets, please use the [ TheDavidDelta's OpenERP Code Snippets] ( https://marketplace.visualstudio.com/items?itemName=TheDavidDelta.openerp-code-snippets ) extension.
44
44
@@ -67,77 +67,88 @@ Below is a list of all available snippets.
67
67
<details >
68
68
<summary >Python snippets</summary >
69
69
70
- | Snippet | Description |
71
- | ---------- | ---------------------------- |
72
- | ` oman ` | Create Odoo Manifest |
73
- | ` omod ` | Create New Odoo Model |
74
- | ` omodi ` | Inherit Existing Odoo Model |
75
- | ` owiz ` | Create New Odoo wizard |
76
- | ` owizi ` | Inherit Existing Odoo wizard |
77
- | ` omodt ` | Create Test to Odoo Model |
78
- | ` ofbin ` | Add new field Binary |
79
- | ` ofbool ` | Add new field Boolean |
80
- | ` ofchar ` | Add new field Char |
81
- | ` ofdate ` | Add new field Date |
82
- | ` oftime ` | Add new field DateTime |
83
- | ` offloat ` | Add new field Float |
84
- | ` ofhtml ` | Add new field HTML |
85
- | ` ofint ` | Add new field Integer |
86
- | ` oftxt ` | Add new field Text |
87
- | ` ofsel ` | Add new field Selection |
88
- | ` ofm2o ` | Add new field Many2one |
89
- | ` ofm2m ` | Add new field Many2many |
90
- | ` ofo2m ` | Add new field One2many |
91
- | ` omcreate ` | Add a method create |
92
- | ` omwrite ` | Add a method write |
93
- | ` omunlink ` | Add a method unlink |
94
- | ` omcomp ` | Add a method compute |
95
- | ` omchange ` | Add a method onchange |
70
+ | Snippet | Description |
71
+ | ----------- | --------------------------------- |
72
+ | ` oman ` | Create Odoo Manifest |
73
+ | ` omod ` | Create New Odoo Model |
74
+ | ` omodi ` | Inherit Existing Odoo Model |
75
+ | ` owiz ` | Create New Odoo wizard |
76
+ | ` owizi ` | Inherit Existing Odoo wizard |
77
+ | ` omodt ` | Create Test to Odoo Model |
78
+ | ` ofbin ` | Add new field Binary |
79
+ | ` ofbool ` | Add new field Boolean |
80
+ | ` ofchar ` | Add new field Char |
81
+ | ` ofdate ` | Add new field Date |
82
+ | ` oftime ` | Add new field DateTime |
83
+ | ` offloat ` | Add new field Float |
84
+ | ` ofhtml ` | Add new field HTML |
85
+ | ` ofint ` | Add new field Integer |
86
+ | ` oftxt ` | Add new field Text |
87
+ | ` ofsel ` | Add new field Selection |
88
+ | ` ofm2o ` | Add new field Many2one |
89
+ | ` ofm2m ` | Add new field Many2many |
90
+ | ` ofo2m ` | Add new field One2many |
91
+ | ` omcreate ` | Add a method create |
92
+ | ` omwrite ` | Add a method write |
93
+ | ` omunlink ` | Add a method unlink |
94
+ | ` omcomp ` | Add a method compute |
95
+ | ` omchange ` | Add a method onchange |
96
+ | ` ousercomp ` | Add self.user.company_id snippets |
96
97
97
98
</details >
98
99
99
100
<details >
100
- <summary >XML and Report snippets</summary >
101
+ <summary >XML snippets</summary >
102
+
103
+ | Snippet | Description |
104
+ | ------------ | ---------------------------------------- |
105
+ | ` odoo ` | Create Odoo Tag |
106
+ | ` oform ` | Create Form View |
107
+ | ` oformi ` | Inherit Existing Form View |
108
+ | ` otree ` | Create Tree View |
109
+ | ` otreei ` | Inherit Existing Tree View |
110
+ | ` osearch ` | Create Search View |
111
+ | ` osearchi ` | Inherit Existing Search View |
112
+ | ` ograph ` | Create Graph View |
113
+ | ` ographi ` | Inherit Existing Graph View |
114
+ | ` opivot ` | Create Pivot View |
115
+ | ` opivoti ` | Inherit Existing Pivot View |
116
+ | ` okanban ` | Create Kanban View |
117
+ | ` okanbani ` | Inherit Existing Kanban View |
118
+ | ` ocalendar ` | Create Calendar View |
119
+ | ` ocalendari ` | Inherit Existing Calendar View |
120
+ | ` ogantt ` | Create Gantt View |
121
+ | ` ogantti ` | Inherit Existing Gantt View |
122
+ | ` oxpath ` | Add the structure of xpath |
123
+ | ` oxpathattr ` | Add the structure of xpath to attributes |
124
+ | ` oact ` | Create new Action |
125
+ | ` onote ` | Add notebook and page tags |
126
+ | ` opage ` | Add new page tag |
127
+ | ` omenur ` | Create New Menu Item in the Upper bar |
128
+ | ` omenuc ` | Create New Menu Item for Categories |
129
+ | ` omenua ` | Create New Menu Item for Actions |
130
+ | ` ocron ` | Add a ir.cron record (11.0 version) |
131
+ | ` obtn ` | Add Odoo button |
132
+ | ` obtnbox ` | Add Button Box on View |
133
+ | ` ogroup ` | Add group tag on View |
134
+ | ` ofield ` | Add Field on View |
135
+ | ` odata ` | Add data tag on View |
136
+
137
+ </details >
138
+
139
+ <details >
140
+ <summary >QWeb snippets</summary >
101
141
102
142
| Snippet | Description |
103
143
| ------------ | ---------------------------------------------- |
104
- | ` odoo ` | Create Odoo Tag |
105
- | ` oform ` | Create Form View |
106
- | ` oformi ` | Inherit Existing Form View |
107
- | ` otree ` | Create Tree View |
108
- | ` otreei ` | Inherit Existing Tree View |
109
- | ` osearch ` | Create Search View |
110
- | ` osearchi ` | Inherit Existing Search View |
111
- | ` ograph ` | Create Graph View |
112
- | ` ographi ` | Inherit Existing Graph View |
113
- | ` opivot ` | Create Pivot View |
114
- | ` opivoti ` | Inherit Existing Pivot View |
115
- | ` okanban ` | Create Kanban View |
116
- | ` okanbani ` | Inherit Existing Kanban View |
117
- | ` ocalendar ` | Create Calendar View |
118
- | ` ocalendari ` | Inherit Existing Calendar View |
119
- | ` ogantt ` | Create Gantt View |
120
- | ` ogantti ` | Inherit Existing Gantt View |
121
- | ` oxpath ` | Add the structure of xpath |
122
- | ` oxpathattr ` | Add the structure of xpath to attributes |
123
- | ` oact ` | Create new Action |
124
- | ` onote ` | Add notebook and page tags |
125
- | ` opage ` | Add new page tag |
126
- | ` omenur ` | Create New Menu Item in the Upper bar |
127
- | ` omenuc ` | Create New Menu Item for Categories |
128
- | ` omenua ` | Create New Menu Item for Actions |
129
- | ` ocron ` | Add a ir.cron record (11.0 version) |
130
- | ` obtn ` | Add Odoo button |
131
- | ` obtnbox ` | Add Button Box on View |
132
- | ` ogroup ` | Add group tag on View |
133
- | ` ofield ` | Add Field on View |
134
- | ` odata ` | Add data tag on View |
135
144
| ` oreport ` | Create report record on View |
136
145
| ` otemplate ` | Create template tag |
137
146
| ` otemplatei ` | Create template inherit tag |
138
147
| ` otcall ` | Add t-call tag on View |
139
148
| ` otforeach ` | Add t-foreach tag on View |
140
149
| ` otif ` | Add t-if tag on View |
150
+ | ` otelif ` | Add t-elif tag on View |
151
+ | `otifelse | Add t-if-else tag on View |
141
152
| ` otraw ` | Add t-raw tag on View |
142
153
| ` otesc ` | Add t-esc tag on View |
143
154
| ` otset ` | Add t-set tag on View |
@@ -148,7 +159,7 @@ Below is a list of all available snippets.
148
159
149
160
## Contributing
150
161
151
- Please, see contributing guidelines [ here] ( https://github.com/mstuttgart/odoo-vscode-snippets/blob/develop/ CONTRIBUTING.md) .
162
+ Please, see contributing guidelines [ here] ( CONTRIBUTING.md ) .
152
163
153
164
## Release Notes
154
165
@@ -158,4 +169,4 @@ See [changelog](CHANGELOG.md).
158
169
159
170
This snippets are based in [ odoo-pycharm-templates] ( https://github.com/mohamedmagdy/odoo-pycharm-templates ) project.
160
171
161
- Copyright (C) 2018-2021 by Michell Stuttgart
172
+ Copyright (C) 2018-2022 by Michell Stuttgart
0 commit comments