diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-04-19 11:58:44 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-04-19 11:58:44 +0200 |
| commit | e56be854abd87a57dd1f6c131328ebd572d62a26 (patch) | |
| tree | 17300ce55eb8304dedfd348b968481450bc66fc6 /addons/board/static | |
| parent | 54ae09b100921041d60f61bee7f3a73280a79e35 (diff) | |
| parent | 204935119d17096978958c09d1389fb4c36deec0 (diff) | |
[MERGE] forward port branch saas-11.3 up to 204935119d1
Diffstat (limited to 'addons/board/static')
| -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); |
