Skip to content

Commit 72f19b4

Browse files
committed
[NEW] Add gantt and gantt inherit views snippets
1 parent 6e2ef06 commit 72f19b4

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ Below is a list of all available snippets.
7676
| `okanbani` | Inherit Existing Kanban View |
7777
| `ocalendar` | Create Calendar View |
7878
| `ocalendari` | Inherit Existing Calendar View |
79+
| `ogantt` | Create Gantt View |
80+
| `ogantti` | Inherit Existing Gantt View |
7981
| `oxpath` | Add the structure of xpath |
8082
| `oxpathattr` | Add the structure of xpath to attributes |
8183
| `oact` | Create new Action |

snippets/xml.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,39 @@
234234
],
235235
"description": "Inherit Existing Calendar View"
236236
},
237+
"odoo_gantt": {
238+
"prefix": "ogantt",
239+
"body": [
240+
"<!-- ${1:model.name} gantt view -->",
241+
"<record id=\"${2:model_name}_view_gantt\" model=\"ir.ui.view\">",
242+
"\t<field name=\"name\">${1:first.name}.view.gantt</field>",
243+
"\t<field name=\"model\">${1:first.name}</field>",
244+
"\t<field name=\"arch\" type=\"xml\">",
245+
"\t\t<gantt string=\"${3:Gantt Description}\" date_start=\"{4}\">",
246+
"\t\t\t<!-- Add your fields here -->",
247+
"\t\t\t$0",
248+
"\t\t</gantt>",
249+
"\t</field>",
250+
"</record>"
251+
],
252+
"description": "Create Gantt View"
253+
},
254+
"odoo_gantt_inherit": {
255+
"prefix": "ogantti",
256+
"body": [
257+
"<!-- ${1:model.name} inherit gantt view -->",
258+
"<record id=\"${2:view_id}\" model=\"ir.ui.view\">",
259+
"\t<field name=\"name\">${1:model.name}.inherit.view.gantt</field>",
260+
"\t<field name=\"model\">${1:model.name}</field>",
261+
"\t<field name=\"inherit_id\" ref=\"${3:base_module}.${2:view_id}\"/>",
262+
"\t<field name=\"arch\" type=\"xml\">",
263+
"\t\t<!-- Add you xpath here -->",
264+
"\t\t$0",
265+
"\t</field>",
266+
"</record>"
267+
],
268+
"description": "Inherit Existing Gantt View"
269+
},
237270
"odoo_xpath": {
238271
"prefix": "oxpath",
239272
"body": [

0 commit comments

Comments
 (0)