Odoo Ayuda

2

1
2 Answers
1

Thanks Suraj! I found how to do it; i'm using  web.Widget instead.

var core = require('web.core');
var Widget= require('web.Widget'); var widgetRegistry = require('web.widget_registry'); var FieldManagerMixin = require('web.FieldManagerMixin');
var MyWidget = Widget.extend(FieldManagerMixin, {
init: function (parent, model, state) {
this._super(parent); FieldManagerMixin.init.call(this); // init code here
},
start: function () {
         //codes
},
events: {
"click button.ct_button_filter": "open_search_dialog",
},
open_search_dialog: function () {
//codes...
},
display_filter: function () {
//codes...
},
});

widgetRegistry.add(
'my_widget', MyWidget
);
On the form side i call it this way <widget name="my_widget"/> 
2 Comments
sibi0229
7/5/18 2:51

Hi guys kindly give me an information about how to call this widget in xml side with some detail information hope it will help me a lot

Rohit Pandey
19/2/19 2:52

How can i place Odoo control pannel in custom widget @Bréndou Serge Eric

0

Hello, you can do it as follows:

var FormView = require('web.FormView');

var MyWidget = FormView.extend({

  template: "your template name",

events: {

//events here

}

//functions for widge 

});

return MyWidget;

Realizar una pregunta
Etiquetas
Keep Informed
1 seguidor(es)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now