summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/views/basic_model_tests.js
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2017-05-23 15:31:44 +0200
committerAaron Bohy <aab@odoo.com>2017-05-24 08:25:22 +0200
commit460c21f76578cceec364f0431d03e4f4515d6acc (patch)
treecb12f821bd6a1fd346e9eb43fbf968c0cb518dfe /addons/web/static/tests/views/basic_model_tests.js
parent38dfe6c51df724af7d90e43c98f73b56dd55ab72 (diff)
[FIX] web: Kanban: various bugs in grouped mode
This rev. fixes the next three bugs: - the dataPoints representing each group didn't have the parentID attribute set - when quick creating a record, the res_ids and count attributes of the group, and of the parent weren't correctly updated - when quick creating a record, the environment (view_manager) wasn't correctly updated The combination of thoses bugs produced the following crash. Open a grouped kanban view (e.g. project.task), quick create a record, open that record in form view (note that the pager was wrong, it indicated 0/x, where x number of records), delete the record -> the form is supposed to load the next record, but it crashed because it couldn't get its id (trying to read id null).
Diffstat (limited to 'addons/web/static/tests/views/basic_model_tests.js')
-rw-r--r--addons/web/static/tests/views/basic_model_tests.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/web/static/tests/views/basic_model_tests.js b/addons/web/static/tests/views/basic_model_tests.js
index 7abce2d1fb8..75d1bc3853a 100644
--- a/addons/web/static/tests/views/basic_model_tests.js
+++ b/addons/web/static/tests/views/basic_model_tests.js
@@ -707,7 +707,7 @@ QUnit.module('Views', {
});
QUnit.test('internal state of groups remains when reloading', function (assert) {
- assert.expect(9);
+ assert.expect(10);
this.params.fieldNames = ['foo'];
this.params.domain = [];
@@ -739,6 +739,9 @@ QUnit.module('Views', {
var record = model.get(resultID);
assert.strictEqual(record.data.length, 2, "should have 2 groups");
var groupID = record.data[0].id;
+ assert.strictEqual(model.localData[groupID].parentID, resultID,
+ "parentID should be correctly set on groups");
+
model.toggleGroup(groupID);
record = model.get(resultID);