Widgets are most powerful workstation and the Odoo web client bundles jQuery for easy DOM manipulation. It is useful and provides a better API then standard W3C DOM2, but it is insufficient to structure complex applications which leads to difficult maintenance.
For example code is given below.
local.HomePage = instance.Widget.extend({
start: function() {
console.log("pet store home page loaded");
});
local.HomePage = instance.Widget.extend({ start: function() { console.log("pet store home page loaded"); }, });
instance.web.client_actions.add(
'petstore.homepage', 'instance.oepetstore.HomePage');
Note- The widget will be called from outside our module, the web client needs its "fully qualified" name, not the local version.
0 Comment(s)