ello everyone! I used to define custom form widgets in odoo 12 as follow:
var core = require('web.core');
var form_common = require('web.form_common');
var MyWidget = form_common.FormWidget.extend({
init: function (parent, object) {
console.log('INIT!!!');
this._super.apply(this, arguments);
},
start: function () {
//codes
},
events: {
"click button.ct_button_filter": "open_search_dialog",
},
open_search_dialog: function () {
//codes...
},
display_filter: function () {
//codes...
},
});
core.form_custom_registry.add(
'my_widget', MyWidget
);
and invoke it in this way:
...<field name="trace_id" widget="my_widget" />
Do you have any idea guys?