diff options
| author | Swapnesh Shah <swapneshshah111@gmail.com> | 2018-10-14 20:34:43 +0000 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2018-12-28 10:33:05 +0000 |
| commit | d67658c043c8b9da3dd04ef73ade6685410c2f8b (patch) | |
| tree | 2184bbfa1f9e2f1da272c49323fed2db309e07c5 /addons/web/static | |
| parent | ff873626ed747b2f3c246323f99cde213f3e983a (diff) | |
[FIX] mail,web: link attachments & messages
The information of the active model and record was not given in the context
Records created from the Manage Messages and Manage Attachements in the debug
menu were not linked to the current records
Add context in test too
closes odoo/odoo#27766
Diffstat (limited to 'addons/web/static')
| -rw-r--r-- | addons/web/static/src/js/tools/debug_manager.js | 4 | ||||
| -rw-r--r-- | addons/web/static/tests/tools/debug_manager_tests.js | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/addons/web/static/src/js/tools/debug_manager.js b/addons/web/static/src/js/tools/debug_manager.js index 391d8613aac..e4134d18afc 100644 --- a/addons/web/static/src/js/tools/debug_manager.js +++ b/addons/web/static/src/js/tools/debug_manager.js @@ -365,6 +365,10 @@ DebugManager.include({ views: [[false, 'list'], [false, 'form']], type: 'ir.actions.act_window', domain: [['res_model', '=', this._action.res_model], ['res_id', '=', selectedIDs[0]]], + context: { + default_res_model: this._action.res_model, + default_res_id: selectedIDs[0], + }, }); }, get_metadata: function() { diff --git a/addons/web/static/tests/tools/debug_manager_tests.js b/addons/web/static/tests/tools/debug_manager_tests.js index cf31d085a50..d8804e88882 100644 --- a/addons/web/static/tests/tools/debug_manager_tests.js +++ b/addons/web/static/tests/tools/debug_manager_tests.js @@ -46,6 +46,10 @@ QUnit.module('DebugManager', {}, function () { intercepts: { do_action: function (event) { assert.deepEqual(event.data.action, { + context: { + default_res_model: "test.model", + default_res_id: 5, + }, domain: [["res_model", "=", "test.model"],["res_id", "=", 5]], name: "Manage Attachments", res_model: "ir.attachment", |
