Odoo Help


How to call the super ._super() in javascript widgets.

Leonardo Donelli
on 6/25/14, 5:44 AM 2,674 views

I wanted to modify the start method of the Advanced Search Javascript Controller (instance.web.search.Advanced), particularly I just wanted to edit the callback function of the fields_get method, which is passed to $.when as a deferred.

The problem is that the start method calls ._super() but if I overwrite extend it (using .include() or .extend()) the ._super() function will refer to the AdvancedSearch start method at not to the start method the original ._super() calls (which is the one of instance.web.search.Input) I tried directly setting instance.web.search.Advanced.start = function() { ... } copying the whole function with the little addition in the callback, but it won't work.


Here is a little scheme to make things clearer:

search.Input:start <- search.Advanced:start <- search.MyCustomAdvanced:start

MyCustomAdvanced:start should be identical to Advanced:start except for an extra test in the callback (.done()) of the fields_get method. Advanced:start calls ._super(), which refers to Input:start. But if I just copy that ._super() in MyCustomAdvanced:start, it will refer to Advanced:start (which I don't need because I'm copying it anyway) and not to Input:start

If answer helped you, please give up-vote and click on right tick mark.

on 1/25/17, 3:16 PM
On 12/12/16, 1:14 PM

Hi Leonardo,

If argument contains function hand, it will be called Expired Expired Expired like this:

init: function (view, node) {

this._super (view, node);



this._super ();

if yes goal widget is there, you-have function to overwrite whole, I did la même: Refer this link:


https: //www.odoo.com/fr_FR/forum/aide-1/question/odoo-9-graph-widget-how-to-customise-the-bar-graph-111699 


Hope this will help you.


C h andni

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: 6/25/14, 5:44 AM
Seen: 2674 times
Last updated: 12/12/16, 1:15 PM