Add id for particular field in XML
than add js code in js file like below:
openerp.module_name = function(instance) {
var QWeb = openerp.web.qweb;
_t = instance.web._t;
instance.web.FormView.include({
load_form: function(data) {
var self = this;
this.$el.find('#field id').on('change', function() {
alert( this.value ); // or $(this).val()
// here put your logic for validation field.
});
return self._super(data);
},
});
};
How to do it in odoo9?
ReplyDeleteAny sample code.