[FIX] web: fix two small crashes in debug manager

- remove edit workflow link in debug manager. The workflow feature was
    removed, but there was still a link in the debug manager.  Clicking on
    that link was a crash.
- the rpc to fetch a view was wrongly updated, so the return value was
  not properly used.
This commit is contained in:
Géry Debongnie
2017-04-11 19:44:38 +02:00
committed by Aaron Bohy
parent eed432519e
commit 0ef53d742c
2 changed files with 2 additions and 13 deletions
@@ -176,7 +176,8 @@ var DebugManager = Widget.extend({
fields: ['name', 'model', 'type'],
limit: 1,
})
.then(function (view) {
.then(function (views) {
var view = views[0];
self.do_action({
type: 'ir.actions.act_window',
name: view.name,
@@ -262,17 +263,6 @@ DebugManager.include({
}
});
},
edit_workflow: function () {
return this.do_action({
res_model: 'workflow',
name: _t('Edit Workflow'),
domain: [['osv', '=', this._action.res_model]],
views: [[false, 'list'], [false, 'form'], [false, 'diagram']],
type: 'ir.actions.act_window',
view_type: 'list',
view_mode: 'list'
});
},
translate: function() {
this._rpc({
model: 'ir.translation',
-1
View File
@@ -128,7 +128,6 @@
<t t-if="action.res_model">
<li><a href="#" data-action="get_view_fields">View Fields</a></li>
<li><a href="#" data-action="manage_filters">Manage Filters</a></li>
<li t-if="manager._is_admin"><a href="#" data-action="edit_workflow">Edit Workflow</a></li>
<li><a href="#" data-action="translate">Technical Translation</a></li>
</t>
</t>