Skip to content

Commit

Permalink
[FIX] web: KanbanSelection and Priority widgets
Browse files Browse the repository at this point in the history
Use directly datarecord id instead of previously stored value which may
not be up to date.
  • Loading branch information
KangOl committed Feb 27, 2015
1 parent fb285d8 commit 128de18
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions addons/web/static/src/js/view_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -2365,7 +2365,6 @@ instance.web.form.KanbanSelection = instance.web.form.FieldChar.extend({
},
render_value: function() {
var self = this;
this.record_id = this.view.datarecord.id;
this.states = this.prepare_dropdown_selection();;
this.$el.html(QWeb.render("KanbanSelection", {'widget': self}));
this.$el.find('li').on('click', this.set_kanban_selection.bind(this));
Expand All @@ -2383,7 +2382,7 @@ instance.web.form.KanbanSelection = instance.web.form.FieldChar.extend({
write_values[self.name] = value;
return this.view.dataset._model.call(
'write', [
[self.record_id],
[this.view.datarecord.id],
write_values,
self.view.dataset.get_context()
]).done(self.reload_record.bind(self));
Expand Down Expand Up @@ -2421,7 +2420,6 @@ instance.web.form.Priority = instance.web.form.FieldChar.extend({
},
render_value: function() {
var self = this;
this.record_id = this.view.datarecord.id;
this.priorities = this.prepare_priority();
this.$el.html(QWeb.render("Priority", {'widget': this}));
if (!this.get('readonly')){
Expand All @@ -2441,7 +2439,7 @@ instance.web.form.Priority = instance.web.form.FieldChar.extend({
write_values[self.name] = value;
return this.view.dataset._model.call(
'write', [
[self.record_id],
[this.view.datarecord.id],
write_values,
self.view.dataset.get_context()
]).done(self.reload_record.bind(self));
Expand Down

0 comments on commit 128de18

Please sign in to comment.