summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorMartin Geubelle <mge@odoo.com>2017-04-12 17:19:36 +0200
committerMartin Geubelle <mge@odoo.com>2017-04-13 11:14:40 +0200
commit87ac617eb1418d5d5edba2e0aae99adb506c0f78 (patch)
tree1026068a57a9052f900d7371e4a9be3d87efccae /addons/web/static/src/js
parent35c7cfa99e4dbdea7b76b6e591bf56ec70b5766f (diff)
[FIX] web: Kanban: edit the kanban color
The method has not been correctly ported to the new view (in the new model in this case). The change (on the color) needs to be notified to the model before updating the record.
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/views/kanban/kanban_controller.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/addons/web/static/src/js/views/kanban/kanban_controller.js b/addons/web/static/src/js/views/kanban/kanban_controller.js
index 875f1042403..ab0f4cb6d07 100644
--- a/addons/web/static/src/js/views/kanban/kanban_controller.js
+++ b/addons/web/static/src/js/views/kanban/kanban_controller.js
@@ -363,9 +363,14 @@ var KanbanController = BasicController.extend({
* @param {OdooEvent} event
*/
_onUpdateRecord: function (event) {
+ var self = this;
var record = event.target;
- this.alive(this.model.save(record.db_id, event.data))
- .then(record.update.bind(record));
+ this.model.notifyChanges(record.db_id, event.data).then(function () {
+ self.model.save(record.db_id).then(function () {
+ var state = self.model.get(record.db_id);
+ record.update(state);
+ });
+ });
},
});