Skip to content

Commit

Permalink
[13.0] [PORT] from 12.0
Browse files Browse the repository at this point in the history
[12.0] [FIX] portal_sale_distributor: Avoid problems with the comercial user when create SO.

After this odoo change odoo/odoo@99d0308
This hack is necessary in the method "message auto subscribe" to make it's works.
  • Loading branch information
nicomacr committed Feb 5, 2021
1 parent 07346cc commit 84fa5dc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions portal_sale_distributor/models/mail_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class MailThread(models.AbstractModel):
_inherit = 'mail.thread'

def _message_auto_subscribe_notify(self, partner_ids, template):
def _message_auto_subscribe(self, updated_values, followers_existing_policy='skip'):
""" Cuando usuario portal crea OV se manda un mensjae de suscripcion
al comercial, esto terminahaciendo que se arroje error si se tiene
instalado mass_mailing y las estadisticas por permiso de acceso
Expand All @@ -14,6 +14,5 @@ def _message_auto_subscribe_notify(self, partner_ids, template):
if self._name == 'sale.order' and \
not self.env.user.has_group('base.group_user'):
self = self.sudo()
return super(
MailThread, self)._message_auto_subscribe_notify(
partner_ids, template)

return super()._message_auto_subscribe(updated_values, followers_existing_policy=followers_existing_policy)

0 comments on commit 84fa5dc

Please sign in to comment.