[FIX] crm: show newly created meetings in calendar

When clicking on the stat button "Meetings" on a contact:

- before dac91bc18 (November 2019): only meetings with participant
  matching contact name are shown

- after dac91bc18 (November 2019): all meetings are shown => this was
  because the view was used to create new meeting, so it makes sense to
  see other meetings and not have a conflict.

- after 16206d72 (August 2020): only meeting of the contact are shown

- after 7449c8a6 and d11fb611 (November 2020): more complicated logic
  that will also show partner events, and child partner events.

Since August 2020, when you create a new event, since we are showing a
list of IDs at the time the button was clicked, the new event will not
appear unless you go back to the contact, then click on "Meetings" anew.

With this changeset, we still show a list of IDs, but add an alternative
to also show the events of the current partner (that should be in the
list of IDs, but will match new events).

opw-2374021
closes #61490

closes odoo/odoo#61690

X-original-commit: eb6e03908bfb6ed8bbe231da2a4422ec2e149834
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
This commit is contained in:
Nicolas Lempereur
2020-11-12 17:41:06 +00:00
parent d7221236d2
commit 35809389a6
+1 -1
View File
@@ -100,7 +100,7 @@ class Partner(models.Model):
action['context'] = {
'default_partner_ids': partner_ids,
}
action['domain'] = [('id', 'in', self._compute_meeting()[self.id])]
action['domain'] = ['|', ('id', 'in', self._compute_meeting()[self.id]), ('partner_ids', 'in', self.ids)]
return action
def action_view_opportunity(self):