Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
14573 Представления

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.

Лучший ответ

Hi Leonardo,

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

init: function (view, node) {

this._super (view, node);

}

GOLD

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 


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.

Thanks,

C h andni


Аватар
Отменить
Related Posts Ответы Просмотры Активность
5
янв. 22
11628
0
апр. 18
3795
1
мар. 22
6721
1
мар. 15
5013
2
июл. 24
2521