Skip to content

Commit ece6e06

Browse files
committed
Add return action snippet
1 parent d7fca83 commit ece6e06

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

snippets/python.json

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,30 @@
287287
"from odoo.exceptions import ${1|ValidationError,RedirectWarning,AccessDenied,AccessError,CacheMiss,MissingError,UserError|}",
288288
"$0"
289289
],
290-
"description" : "Add Import to Odoo Exceptions"
290+
"description" : "Add return to Action Window Close"
291+
},
292+
"odoo_return_actwin_close": {
293+
"prefix": "oret_act_close",
294+
"body": [
295+
"return {'type': 'ir.actions.act_window_close'}",
296+
"$0"
297+
],
298+
"description" : "Add return to Action Window Close"
299+
},
300+
"odoo_return_actwin": {
301+
"prefix": "oret_act_close",
302+
"body": [
303+
"return {",
304+
"\t'name': ('${1:model.name}.action'),",
305+
"\t'type': 'ir.actions.act_window',",
306+
"\t'res_model': '${1:model.name}',",
307+
"\t'view_type': 'form',",
308+
"\t'view_mode': '${3:tree,form}',",
309+
"\t'target': '${4|current,new,fullscreen,main,inline|}',",
310+
"\t'___domain': [${5}],",
311+
"\t'context': {${6}},",
312+
"}"
313+
],
314+
"description" : "Add return to Action Window Close"
291315
}
292316
}

0 commit comments

Comments
 (0)