Community: Framework mailing list archives

expert-framework@mail.odoo.com

RE: Email templates and auto_delete flag inconsistency

by
Timo Goosen
- 08/05/2014 08:44:44
Can somebody please reconfigure the mass mailing /mailing list software used for this mailing list to include the name of the mailing list
in the title of the message. This is getting very annoying. 

I will even help you configure it if you can't do it yourself.

________________________________________
From: Maxim Litnitskiy [litnimaxster@gmail.com]
Sent: 04 August 2014 02:18 PM
To: Community: Framework
Subject: Re: Email templates and auto_delete flag inconsistency

I was mistaken with dependency direction.
mail.mail has a reference to mail.message that means when we delete mail.message that has corresponding mail.mail the latter is also deleted on cascade.
But!
When we delete mail.mail having corresponding mail.message the latter is not deleted on database level.
So the issue is not with ON CASCADE but on general mail.mail delete procedure.
Here is it - https://github.com/odoo/odoo/blob/master/addons/mail/mail_mail.py#L89

res = super(mail_mail, self).unlink(cr, uid, ids, context=
self.pool.get('mail.message').unlink(cr, uid, parent_msg_ids, context=context)

1. Delete mail.mail
2. Delete mail.message of this mail.
Until second line is removed no lead autoreply will work correctly.

Here is the bug - https://github.com/odoo/odoo/issues/1556

Regards,
Max.




    _columns = {
        'mail_message_id': fields.many2one('mail.message', 'Message', required=True, ondelete='cascade'),

Why  delete messages when deleting email?


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-framework-62
Post to: mailto:expert-framework@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe