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.
1 parent 53206d6 commit b5d0fb4Copy full SHA for b5d0fb4
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
+ "\if 1==1:",
223
+ "\\raise ValidationError()",
224
+ "$0"
225
+ ],
226
+ "description": "Add a constraint method"
227
+ },
228
"odoo_method_onchange": {
229
"prefix": "omchange",
230
"body": [
0 commit comments