[IMP] website_crm_score: don't send email with auto assignation + don't send mail for each pageview. Salesmen are spammed
This commit is contained in:
@@ -40,7 +40,8 @@ class pageview(models.Model):
|
||||
if fetch:
|
||||
# a new pageview has been created, a message is posted
|
||||
body = '<a href="' + url + '" target="_blank"><b>' + url + '</b></a>'
|
||||
self.pool['crm.lead'].message_post(cr, SUPERUSER_ID, [lead_id], body=body, subject="Page visited", context=context)
|
||||
ctx = dict(context or {}, mail_notify_noemail=True)
|
||||
self.pool['crm.lead'].message_post(cr, SUPERUSER_ID, [lead_id], body=body, subject="Page visited", context=ctx)
|
||||
return True
|
||||
except IntegrityError:
|
||||
return False
|
||||
|
||||
@@ -25,7 +25,6 @@ except ImportError:
|
||||
def checkmail(mail):
|
||||
return True
|
||||
|
||||
|
||||
class section_user(models.Model):
|
||||
_name = 'section.user'
|
||||
|
||||
@@ -119,7 +118,7 @@ class crm_case_section(osv.osv):
|
||||
|
||||
@api.model
|
||||
def direct_assign_leads(self, ids=[]):
|
||||
ctx = dict(self._context, mail_track_log_only=True)
|
||||
ctx = dict(self._context, mail_notify_noemail=True)
|
||||
self.with_context(ctx)._assign_leads()
|
||||
|
||||
@api.model
|
||||
|
||||
Reference in New Issue
Block a user