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 19:55:44 +0200
committerChristophe Simonis <chs@odoo.com>2017-07-26 19:55:44 +0200
commit4f501348c41f38befec5374e0e4b50b30c0e6989 (patch)
tree837b3743b1b77da47451aa4b9b393ec517d5b6b1 /addons/web/static/tests/views/basic_model_tests.js
parent8a497cdd5ff4cf93067d0519a9839ea6ec9adc21 (diff)
parent46e1104ce12e3c31722d2f84ca79b78055e925d6 (diff)
[MERGE] forward port branch saas-16 up to 46e1104ce12
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");