diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-04-18 18:30:35 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-04-18 18:30:35 +0200 |
| commit | c309ccd7b3d7e2f4884f6e9e47a98d64ceac8ea1 (patch) | |
| tree | 82deec2a691d9aee34d70aedac9b68ab75c2825c /addons/board | |
| parent | e63e9857411a056538f357b1800d31c835a1647c (diff) | |
| parent | fed775bc0c2d70463206bbdddd3cce9ae8469e6a (diff) | |
[MERGE] forward port branch saas-11.2 up to fed775bc0c2
Diffstat (limited to 'addons/board')
| -rw-r--r-- | addons/board/static/src/js/board_view.js | 8 | ||||
| -rw-r--r-- | addons/board/static/tests/dashboard_tests.js | 16 |
2 files changed, 12 insertions, 12 deletions
diff --git a/addons/board/static/src/js/board_view.js b/addons/board/static/src/js/board_view.js index e5fd56ad049..f65e6bb1e85 100644 --- a/addons/board/static/src/js/board_view.js +++ b/addons/board/static/src/js/board_view.js @@ -28,7 +28,7 @@ var BoardController = FormController.extend({ */ init: function (parent, model, renderer, params) { this._super.apply(this, arguments); - this.viewID = params.viewID; + this.customViewID = params.customViewID; }, //-------------------------------------------------------------------------- @@ -58,9 +58,9 @@ var BoardController = FormController.extend({ var board = this.renderer.getBoard(); var arch = QWeb.render('DashBoard.xml', _.extend({}, board)); return this._rpc({ - route: '/web/view/add_custom', + route: '/web/view/edit_custom', params: { - view_id: this.viewID, + custom_id: this.customViewID, arch: arch, } }).then(dataManager.invalidate.bind(dataManager)); @@ -426,7 +426,7 @@ var BoardView = FormView.extend({ */ init: function (viewInfo) { this._super.apply(this, arguments); - this.controllerParams.viewID = viewInfo.view_id; + this.controllerParams.customViewID = viewInfo.custom_view_id; }, }); diff --git a/addons/board/static/tests/dashboard_tests.js b/addons/board/static/tests/dashboard_tests.js index 1ef295e3962..1211fc5da05 100644 --- a/addons/board/static/tests/dashboard_tests.js +++ b/addons/board/static/tests/dashboard_tests.js @@ -126,8 +126,8 @@ QUnit.test('basic functionality, with one sub action', function (assert) { if (route === '/web/dataset/search_read') { assert.deepEqual(args.domain, [['foo', '!=', 'False']], "the domain should be passed"); } - if (route === '/web/view/add_custom') { - assert.step('add custom'); + if (route === '/web/view/edit_custom') { + assert.step('edit custom'); return $.when(true); } return this._super.apply(this, arguments); @@ -158,7 +158,7 @@ QUnit.test('basic functionality, with one sub action', function (assert) { form.$('.oe_fold').click(); assert.ok(form.$('.oe_content').is(':visible'), "content is visible again"); - assert.verifySteps(['load action', 'add custom', 'add custom']); + assert.verifySteps(['load action', 'edit custom', 'edit custom']); assert.strictEqual($('.modal').length, 0, "should have no modal open"); @@ -186,7 +186,7 @@ QUnit.test('basic functionality, with one sub action', function (assert) { assert.strictEqual($('.modal').length, 0, "should have no modal open"); assert.strictEqual(form.$('.oe_action').length, 0, "should have no displayed action"); - assert.verifySteps(['load action', 'add custom', 'add custom', 'add custom', 'add custom']); + assert.verifySteps(['load action', 'edit custom', 'edit custom', 'edit custom', 'edit custom']); form.destroy(); }); @@ -295,8 +295,8 @@ QUnit.test('can drag and drop a view', function (assert) { views: [[4, 'list']], }); } - if (route === '/web/view/add_custom') { - assert.step('add custom'); + if (route === '/web/view/edit_custom') { + assert.step('edit custom'); return $.when(true); } return this._super.apply(this, arguments); @@ -342,8 +342,8 @@ QUnit.test('twice the same action in a dashboard', function (assert) { views: [[4, 'list'],[5, 'kanban']], }); } - if (route === '/web/view/add_custom') { - assert.step('add custom'); + if (route === '/web/view/edit_custom') { + assert.step('edit custom'); return $.when(true); } return this._super.apply(this, arguments); |
