Skip to content

Commit fcc14d1

Browse files
committed
Add new snippets
1 parent 92a7740 commit fcc14d1

File tree

2 files changed

+44
-2
lines changed

2 files changed

+44
-2
lines changed

Diff for: README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,16 @@ Below is a list of all available snippets.
140140
| `omenur` | Create New Menu Item in the Upper bar |
141141
| `omenuc` | Create New Menu Item for Categories |
142142
| `omenua` | Create New Menu Item for Actions |
143-
| `ocron` | Add a ir.cron record (11.0 version) |
143+
| `ocron` | Add a ir.cron record |
144144
| `obtn` | Add Odoo button |
145145
| `obtnbox` | Add Button Box on View |
146146
| `ogroup` | Add group tag on View |
147147
| `ofield` | Add Field on View |
148148
| `odata` | Add data tag on View |
149149
| `ochatter` | Add chatter tag on View |
150+
| `oaurl` | Create action.url tag |
151+
| `oaserver` | Create action.server tag |
152+
| `oaclient` | Create action.client tag |
150153

151154
<!-- <summary>QWeb snippets</summary> -->
152155

@@ -159,7 +162,7 @@ Below is a list of all available snippets.
159162
| `otforeach` | Add t-foreach tag on View |
160163
| `otif` | Add t-if tag on View |
161164
| `otelif` | Add t-elif tag on View |
162-
| `otifelse` | Add t-if-else tag on View |
165+
| `otifelse` | Add t-if-else tag on View |
163166
| `otraw` | Add t-raw tag on View |
164167
| `otesc` | Add t-esc tag on View |
165168
| `otset` | Add t-set tag on View |

Diff for: snippets/xml.json

+39
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@
399399
"\t<field name=\"model_id\" ref=\"model_${2:model_name}\"/>",
400400
"\t<field name=\"state\">code</field>",
401401
"\t<field name=\"code\">model.${10:method_name}()</field>",
402+
"\t<field name=\"priority\" eval=\"5\" />",
402403
"</record>"
403404
],
404405
"description": "Add a ir.cron record"
@@ -586,5 +587,43 @@
586587
"</div>"
587588
],
588589
"description": "Create Odoo 'oechater' tag"
590+
},
591+
"odoo_ir_action_act_url": {
592+
"prefix": "oaurl",
593+
"body": [
594+
"\t<record id=\"action_${1:action_id}\" model=\"ir.actions.act_url\">",
595+
"\t<field name=\"name\">${2:name}</field>",
596+
"\t<field name=\"url\">/${3:url}</field>",
597+
"\t<field name=\"target\">self</field>",
598+
"</record>"
599+
],
600+
"description": "Create action.url tag"
601+
},
602+
"odoo_ir_action_act_server": {
603+
"prefix": "oaserver",
604+
"body": [
605+
"<!-- ${1:model.name} action server -->",
606+
"<record id=\"action_${2:model_name}\" model=\"ir.actions.server\">",
607+
"\t<field name=\"name\">${1}.action.server</field>",
608+
"\t<field name=\"model_id\" ref=\"model_${1:model.name}\"/>",
609+
"\t<field name=\"state\">code</field>",
610+
"\t<field name=\"code\">",
611+
"\t\trecord.${10:method_name}()",
612+
"\t</field>",
613+
"</record>"
614+
],
615+
"description": "Create action.server tag"
616+
},
617+
"odoo_ir_action_act_client": {
618+
"prefix": "oaclient",
619+
"body": [
620+
"<!-- ${1:model.name} action client -->",
621+
"<record id=\"action_${2:model_name}\" model=\"ir.actions.client\">",
622+
"\t<field name=\"name\">${2}.action.client</field>",
623+
"\t<field name=\"tag\" ref=\"${3:tag_name}\"/>",
624+
"\t<field name=\"context\" eval=\"{}\"/>",
625+
"</record>"
626+
],
627+
"description": "Create action.client tag"
589628
}
590629
}

0 commit comments

Comments
 (0)