A client action is an action type defined almost entirely in the client, in javascript for Odoo web. The server simply sends an action tag and optionally adds a few parameters, but beyond that everything is handled by custom client code.For example code below.
instance.web.client_actions.add('petstore.homepage', 'instance.oepetstore.HomePage');
Note- instance.web.client_actions is a Registry() in which the action manager looks up client action handlers when it needs to execute one. The first parameter of add() is the name (tag) of the client action, and the second parameter is the path to the widget from the Odoo web client root.
1 Comment(s)