Browse Source

Merge pull request #364 from CompassionCH/10.0-performance

Add indexes to speed up performance
pull/220/merge
Pedro M. Baeza 6 years ago
committed by GitHub
parent
commit
14b5a30ef4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      mail_sendgrid/models/substitution.py
  2. 2
      mail_tracking/models/mail_tracking_email.py

4
mail_sendgrid/models/substitution.py

@ -15,7 +15,7 @@ class Substitution(models.Model):
key = fields.Char()
lang = fields.Char()
email_template_id = fields.Many2one(
'mail.template', ondelete='cascade')
'mail.template', ondelete='cascade', index=True)
email_id = fields.Many2one(
'mail.mail', ondelete='cascade')
'mail.mail', ondelete='cascade', index=True)
value = fields.Char()

2
mail_tracking/models/mail_tracking_email.py

@ -42,7 +42,7 @@ class MailTrackingEmail(models.Model):
string="Message", comodel_name='mail.message', readonly=True,
index=True)
mail_id = fields.Many2one(
string="Email", comodel_name='mail.mail', readonly=True)
string="Email", comodel_name='mail.mail', readonly=True, index=True)
partner_id = fields.Many2one(
string="Partner", comodel_name='res.partner', readonly=True)
recipient = fields.Char(string='Recipient email', readonly=True)

Loading…
Cancel
Save