summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/views/basic_model_tests.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-07-26 23:35:06 +0200
committerChristophe Simonis <chs@odoo.com>2017-07-26 23:35:06 +0200
commit8a1311bca17bd93a87f94579698adddc416f78f0 (patch)
treebac0ac044fd643927466dc5eb32d0359d9b37bde /addons/web/static/tests/views/basic_model_tests.js
parentfaf72250221e0eb2fc711b9168c75b1dc70120e7 (diff)
parent3d4238f71e48de14afd0072a8309f2bb6fc46eb6 (diff)
[MERGE] forward port branch saas-17 up to 3d4238f71e4
Diffstat (limited to 'addons/web/static/tests/views/basic_model_tests.js')
-rw-r--r--addons/web/static/tests/views/basic_model_tests.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/addons/web/static/tests/views/basic_model_tests.js b/addons/web/static/tests/views/basic_model_tests.js
index 7f7547262da..9e8e64edde6 100644
--- a/addons/web/static/tests/views/basic_model_tests.js
+++ b/addons/web/static/tests/views/basic_model_tests.js
@@ -361,27 +361,27 @@ QUnit.module('Views', {
assert.strictEqual(record.data.product_ids.count, 2,
"there should be two records in the relation");
- // trigger a 'REMOVE' command on the existing record
+ // trigger a 'DELETE' command on the existing record
var existingRecordID = record.data.product_ids.data[0].id;
- model.notifyChanges(resultID, {product_ids: {operation: 'REMOVE', ids: [existingRecordID]}});
+ model.notifyChanges(resultID, {product_ids: {operation: 'DELETE', ids: [existingRecordID]}});
assert.deepEqual(model.localData[x2mListID]._changes, [{
operation: 'ADD', id: newRecordID,
}, {
operation: 'UPDATE', id: newRecordID,
}, {
- operation: 'REMOVE', id: existingRecordID,
+ operation: 'DELETE', id: existingRecordID,
}],
"_changes should be correct");
record = model.get(resultID);
assert.strictEqual(record.data.product_ids.count, 1,
"there should be one record in the relation");
- // trigger a 'REMOVE' command on the new record
- model.notifyChanges(resultID, {product_ids: {operation: 'REMOVE', ids: [newRecordID]}});
+ // trigger a 'DELETE' command on the new record
+ model.notifyChanges(resultID, {product_ids: {operation: 'DELETE', ids: [newRecordID]}});
assert.deepEqual(model.localData[x2mListID]._changes, [{
- operation: 'REMOVE', id: existingRecordID,
+ operation: 'DELETE', id: existingRecordID,
}], "_changes should be correct");
record = model.get(resultID);
assert.strictEqual(record.data.product_ids.count, 0,
@@ -827,7 +827,7 @@ QUnit.module('Views', {
assert.ok(_.isObject(category_value), "category field should have been fetched");
assert.strictEqual(category_value.data.length, 1, "category field should contain one record");
model.notifyChanges(resultID, {category: {
- operation: 'REMOVE',
+ operation: 'DELETE',
ids: [category_value.data[0].id],
}});
assert.ok(model.isDirty(resultID), "record should be considered dirty");