I am working with a function to give notifications using notifyjs,
but when executing it it shows me a missing error} in property list, mi code is
<script>
odoo.define('grp_test.prueba') = function (event) {
'use strict';
errorNull = true;
nombre;
ajax = require ('web.ajax');
local.HomePage = instance.Widget.extend ({
init: checkNull = function(){
$(this).val($(this).val().trim());
if ($(this).val() == "") {
$(this).notify("campo para ser llenado", "error");
$(this).addClass("errtextbox");
errorNull = true;
} else {
errorNull = false;
$(this).removeClass("errtextbox");
}
};
$("#num_a").focusout(checkNull);
$("#info").focusout(checkNull);
$("#num_a").keyup(function(){
value = $(this).val();
if (value.length > 10){
$.notify("El limite son 10 caracteres, se excedio", "warn");
$(this).val(value.slice(0,24));
}
nombre = value;
});
});
}
</script>