[FIX] mass_mailing_partner: Add sudo() to prevent user without mailing access try to merge contacts
This commit is contained in:
parent
0c8846182d
commit
279434032c
@ -9,8 +9,10 @@ class BasePartnerMergeAutomaticWizard(models.TransientModel):
|
|||||||
|
|
||||||
def _merge(self, partner_ids, dst_partner=None, extra_checks=True):
|
def _merge(self, partner_ids, dst_partner=None, extra_checks=True):
|
||||||
if dst_partner:
|
if dst_partner:
|
||||||
contacts = self.env["mailing.contact"].search(
|
contacts = (
|
||||||
[("partner_id", "in", partner_ids)]
|
self.env["mailing.contact"]
|
||||||
|
.sudo()
|
||||||
|
.search([("partner_id", "in", partner_ids)])
|
||||||
)
|
)
|
||||||
if contacts:
|
if contacts:
|
||||||
contacts = contacts.sorted(
|
contacts = contacts.sorted(
|
||||||
|
Loading…
Reference in New Issue
Block a user