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.