From 2b1298bd9e2d1458bb92aea7ec84a32eabae2a3b Mon Sep 17 00:00:00 2001 From: x620 Date: Thu, 24 Mar 2016 12:57:44 +0500 Subject: [PATCH] Changed partner_ids to notified_partner_ids --- res_partner_mails_count/models.py | 2 +- res_partner_mails_count/templates.xml | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/res_partner_mails_count/models.py b/res_partner_mails_count/models.py index dcd036a..0ca91e6 100644 --- a/res_partner_mails_count/models.py +++ b/res_partner_mails_count/models.py @@ -11,7 +11,7 @@ class res_partner(models.Model): @api.one def _mails_to(self): for r in self: - r.mails_to = self.env['mail.message'].sudo().search_count([('partner_ids', 'in', r.id)]) + r.mails_to = self.env['mail.message'].sudo().search_count([('notified_partner_ids', 'in', r.id)]) @api.one def _mails_from(self): diff --git a/res_partner_mails_count/templates.xml b/res_partner_mails_count/templates.xml index 29c6de1..936ba1c 100644 --- a/res_partner_mails_count/templates.xml +++ b/res_partner_mails_count/templates.xml @@ -9,6 +9,19 @@ type="text/javascript"> + + + mail.message.search.notified_partner + mail.message + 50 + + + + + + + + res.partner.mails.count res.partner @@ -18,7 +31,7 @@ @@ -32,4 +45,4 @@ - \ No newline at end of file +