From 2a74666bb00842ec4f1f79a238e27b356599701c Mon Sep 17 00:00:00 2001
From: Martin Trigaux <mat@openerp.com>
Date: Thu, 7 Aug 2014 16:51:46 +0200
Subject: [PATCH] [FIX] mail: avoid duplication followers when merging partners

---
 addons/mail/mail_followers.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/addons/mail/mail_followers.py b/addons/mail/mail_followers.py
index 0059df905300..7816c3c9044f 100644
--- a/addons/mail/mail_followers.py
+++ b/addons/mail/mail_followers.py
@@ -48,6 +48,7 @@ class mail_followers(osv.Model):
             help="Message subtypes followed, meaning subtypes that will be pushed onto the user's Wall."),
     }
 
+    _sql_constraints = [('mail_followers_res_partner_res_model_id_uniq','unique(res_model,res_id,partner_id)','Error, a partner cannot follow twice the same object.')]
 
 class mail_notification(osv.Model):
     """ Class holding notifications pushed to partners. Followers and partners
-- 
GitLab