Hi !
I've searching for 2 days but I don't have results ... I generate a form with HTML in it, and in this html i have a lot of progress bar. The goal is to redirect to the view when clicking on a progress bar. Here my Javascript.
I can get company and status values, but I'm not able to redirect to the view. I certainly miss something but I don't understand where ...
odoo.define('my_module.dashboard_click', function (require) {
'use strict';
$(document).on('click', '.progress-bar', function(){
var company = $(this).nearest('.company_name').text();
var status = 'Pending';
var action = {
type: 'ir.actions.act_window',
name: 'Reciprocities',
res_model: 'zcnp.rec.reciprocity',
view_type: 'form',
view_mode: 'tree'
}
var self = this;
self.do_action(action);
});
});
The result of that is :
TypeError: self.do_action is not a function
http://localhost:8069/web/content/1870-261c03f/web.assets_backend.js:2951 Traceback: @http://localhost:8069/web/content/1870-261c03f/web.assets_backend.js:2951:20 dispatch@http://localhost:8069/web/content/1502-5b3f4b8/web.assets_common.js:892:451 add/elemData.handle@http://localhost:8069/web/content/1502-5b3f4b8/web.assets_common.js:865:173
Thanks !
Hello you found any solution for this?