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.