diff options
| author | ThanhDodeurOdoo <tso@odoo.com> | 2018-09-06 10:45:32 +0200 |
|---|---|---|
| committer | ThanhDodeurOdoo <tso@odoo.com> | 2018-09-13 11:50:26 +0200 |
| commit | d12b88315536150931b01e219c79b248b1fa9c40 (patch) | |
| tree | 677461f120e5e63e71d58c41368f46d0e8164840 /addons/web/static/src/js/tools | |
| parent | 7f97c9fc056a0949c61c8444ee20f4c95bb3e9a9 (diff) | |
[IMP] mail, web: attachments & messages in debug actions.
- added two new actions to the form view debug action list,
both opens list (+ form) views of messages and attachments respectively
for which the domain is restricted to the current record.
task: 1860031
Diffstat (limited to 'addons/web/static/src/js/tools')
| -rw-r--r-- | addons/web/static/src/js/tools/debug_manager.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/addons/web/static/src/js/tools/debug_manager.js b/addons/web/static/src/js/tools/debug_manager.js index 5b944724c11..dcdfc1a73bc 100644 --- a/addons/web/static/src/js/tools/debug_manager.js +++ b/addons/web/static/src/js/tools/debug_manager.js @@ -353,7 +353,20 @@ DebugManager.include({ })); }.bind(this)); }, - + get_attachments: function() { + var selectedIDs = this._controller.getSelectedIds(); + if (!selectedIDs.length) { + console.warn(_t("No attachment available")); + return; + } + this.do_action({ + res_model: 'ir.attachment', + name: _t('Manage Attachments'), + views: [[false, 'list'], [false, 'form']], + type: 'ir.actions.act_window', + domain: [['res_model', '=', this._action.res_model], ['res_id', '=', selectedIDs[0]]], + }); + }, get_metadata: function() { var self = this; var selectedIDs = this._controller.getSelectedIds(); |
