Call a Specific form view of model in odoo js building Dashboard - Stack Overflow
Fri Nov 20 2020 07:54:57 GMT+0000 (Coordinated Universal Time)
Saved by
@don_moses
action_my_profile: function(event) {
var self = this;
event.stopPropagation();
event.preventDefault();
self._rpc({
model: 'ir.model.data',
method: 'xmlid_to_res_id',
kwargs: {xmlid: 'youre_form_id'},
}).then(function (res_id) {
self.do_action({
name: _t("My Profile"),
type: 'ir.actions.act_window',
res_model: 'hr.employee',
res_id: self.employee_data.id,
view_mode: 'form',
view_type: 'form',
views: [[res_id, 'form']],
context: {'edit': true},
domain: [],
target: 'current'
},{on_reverse_breadcrumb: function(){ return self.reload();}})
},
},
content_copyCOPY
https://stackoverflow.com/questions/56827361/call-a-specific-form-view-of-model-in-odoo-js-building-dashboard
Comments