Odoo Help

Welcome!

This community 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.

0

how to reload widget on every product form view?

By
David Baramidze
on 8/4/16, 5:38 AM 328 views

I have problem with my custom widget. when widget starts, it stays on another product. It needs pager refresh to reload with correct parameters. How to reload automatically my widget when I am changing product form view?


openerp.mymodule = function(instance, local) {    
var _t = instance.web._t,
_lt = instance.web._lt;
var QWeb = instance.web.qweb;

instance.web.form.widgets.add('mywidget', 'instance.mymodule.WidgetM');
local.WidgetM = instance.web.form.AbstractField.extend({
start: function() {
this.$el.html(QWeb.render("WidgetTemplate"));                
return this._super();            
}
});
}



Thanks

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 8/4/16, 5:38 AM
Seen: 328 times
Last updated: 8/15/16, 9:15 AM