We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 53206d6 + e03ef19 commit 6c40fadCopy full SHA for 6c40fad
snippets/python.json
@@ -214,6 +214,17 @@
214
],
215
"description": "Add a method compute"
216
},
217
+ "odoo_method_constrains": {
218
+ "prefix": "omconst",
219
+ "body": [
220
+ "@api.constrains('${1:field_name}')",
221
+ "def _check_${1:field_name}(self):",
222
+ "\tif 1==1:",
223
+ "\t\traise ValidationError()",
224
+ "$0"
225
+ ],
226
+ "description": "Add a constraint method"
227
+ },
228
"odoo_method_onchange": {
229
"prefix": "omchange",
230
"body": [
0 commit comments