[FIX] calendar: no add Contact when no useContacts

On a form view the attribute `use_contacts` will:

- when set to True: enable us to add contacts which will be available on
  any time in the calendar,

- when unset: the list of contact is only the contact currently beeing
  seen directly in the calendar.

The feature for adding contact is thus not necessary when
`use_contacts` is unset. But it still appeared without having any effect
(which is unexpected).

This commit remove the contact adding feature when it has no necessity.

opw-715932
This commit is contained in:
Nicolas Lempereur
2017-03-31 09:24:51 +02:00
parent bbb3bd876a
commit 4cfd03d056
@@ -116,6 +116,9 @@ widgets.SidebarFilter.include({
},
initialize_m2o: function() {
var self = this;
if (!this.view.useContacts) {
return;
}
this.dfm = new form_common.DefaultFieldManager(self);
this.dfm.extend_field_desc({
partner_id: {