Browse Source

when quick editing, set records data

pull/236/head
Pierre Verkest 9 years ago
parent
commit
e8182de5d2
  1. 7
      web_widget_boolean_switch/static/src/js/web_widget_boolean_switch.js

7
web_widget_boolean_switch/static/src/js/web_widget_boolean_switch.js

@ -135,7 +135,12 @@ openerp.web_widget_boolean_switch = function(instance){
_.extend(context, view.session.user_context);
var model = new openerp.instances.instance0.web.Model(this.view.model);
model.call('write', [[id], values],
{'context': context});
{'context': context}).then(_.bind(function(){
if(!this.view.grouped){
this.view.records._byId[this.id].attributes[this.field.name] = this.state;
}
}, {'view': this.view, 'field': this.field,
'id': id, 'state': state}));
}, {'view': view, 'field': field})
);
});

Loading…
Cancel
Save