콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1886 화면

I have read many posts but cannot seem to figure out how to solve this.

So there is a base js module like so

odoo.define('module_a', function (require) {

class ModuleA {

_setValue(val) {
// method logic

return

}

}


return ModuleA;

});


A second module, module_b extending the base module...

odoo.define('module_b', function (require) {

const ModuleA = require('module_a');


class ModuleB extends ModuleA {

_setValue(val) {
// method logic

return super._setValue(val)

}

}


return ModuleB;

});



A third module, module c...

odoo.define('module_c', function (require) {

const ModuleB = require('module_b');


class ModuleC extends ModuleB {
_setValue(val) {
// method logic

return super._setValue(val)

}

}


return ModuleC;

});


in the manifest, module b depends on pos. My aim is to make the "super._setValue(val)" in module c to refer to module a not module b. In other words, I just want to overwrite that method in moduleb. That is not the case even when i "require" module a in module c or depend on pos in the manifest.

At the moment I just commented out the method in module b but I wonder how this can be achieved.

아바타
취소
관련 게시물 답글 화면 활동
0
7월 25
452
1
7월 25
5466
0
7월 25
1003
0
6월 25
990
1
6월 25
1112