Skip to content
Permalink
Browse files

[FIX] calendar view `write_model` + `write_field` mechanism doesn't w…

…ork as expected since we always have hardcoded 'partner_id' instead of value of `write_field`
  • Loading branch information...
iledarn committed Mar 14, 2019
1 parent c68a97a commit 8379305b8d1cdfa858f62803869e83c511ec1d50
Showing with 4 additions and 1 deletion.
  1. +4 −1 addons/web/static/src/js/views/calendar/calendar_renderer.js
@@ -113,10 +113,13 @@ var SidebarFilter = Widget.extend(FieldManagerMixin, {
var self = this;
event.stopPropagation();
var value = event.data.changes[this.write_field].id;
var values = new Object();
values['user_id'] = session.uid;
values[this.write_field] = value;
this._rpc({
model: this.write_model,
method: 'create',
args: [{'user_id': session.uid,'partner_id': value,}],
args: [values],
})
.then(function () {
self.trigger_up('changeFilter', {

0 comments on commit 8379305

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.