[FIX] website_mail: force the copy method not to copy website_message_ids field, we do not want duplicated emails (opw 605975).

bzr revid: mat@openerp.com-20140402123707-r3e38b64zsheq0tn
This commit is contained in:
Martin Trigaux 2014-04-02 14:37:07 +02:00
parent 7c9db05d1e
commit 9553c48a8b
1 changed files with 5 additions and 1 deletions

View File

@ -21,7 +21,7 @@
from openerp.osv import osv, fields
# TODO for trunk, remove me
class MailThread(osv.Model):
_inherit = 'mail.thread'
@ -35,3 +35,7 @@ class MailThread(osv.Model):
help="Website communication history",
),
}
def copy(self, cr, uid, id, default=None, context=None):
default['website_message_ids'] = []
return super(MailThread, self).copy(cr, uid, id, default=default, context=context)