Odoo Help


how to reload widget on every product form view?

David Baramidze
on 8/4/16, 5:38 AM 1,569 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() {
return this._super();            



Did you manage to solve this problem? I am currently undergoing a similar problem and have been looking for a solution for a while now.

Cats&Dogs bvba, SonnyV
on 4/3/17, 9:45 AM
David Baramidze
On 4/3/17, 10:24 AM

Yes I solved this problem:

start: function() {

       this.field_manager.on("load_record", this, function() {



On 4/3/17, 10:23 AM


As mentioned in my comment I also had this issue.

I was able to solve it using the accepted answer on this stackoverflow thread:


I had a start function, in this function I added the lines mentioned in the stackoverflow thread.

And where the thread says 'put your code here' I called my javascript function. This way my method gets triggered on every form change. Do note that when the pager reloads the method gets called twice.

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 8/4/16, 5:38 AM
Seen: 1569 times
Last updated: 4/5/17, 6:23 PM