In Odoo, If we want to trigger a python function, it can be done with the help of _rpc calls.
this._rpc({ model: this.model, method: 'quick_publish_products', args: [this.res_id], }).then(function (result) { self.do_action(result); });
this._rpc({ model: this.model, method: 'quick_publish_products', args: [this.res_id], }).then(function (result) { self.do_action(result); });