Nimesh Contractor(Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-mail_groups_menu_entries-atp-unlink_menu_action-nco
into lp:~openerp-dev/openobject-addons/trunk-mail_groups_menu_entries-atp.
Requested reviews:
Atul Patel(OpenERP) (atp-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-mail_groups_menu_entries-atp-unlink_menu_action-nco/+merge/119498
Hello sir,
Unlink the action of the group when group is deleted.
Thanks,
NCO.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-mail_groups_menu_entries-atp-unlink_menu_action-nco/+merge/119498
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-mail_groups_menu_entries-atp.
=== modified file 'mail/mail_group.py'
--- mail/mail_group.py 2012-08-14 06:54:44 +0000
+++ mail/mail_group.py 2012-08-14 09:55:30 +0000
@@ -235,9 +235,12 @@
def unlink(self, cr, uid, ids, context=None):
# Cascade-delete mail aliases as well, as they should not exist without the mail group.
mail_alias = self.pool.get('mail.alias')
+ act_obj = self.pool.get('ir.actions.act_window')
alias_ids = [group.alias_id.id for group in self.browse(cr, uid, ids, context=context) if group.alias_id]
+ action_ids = [group.action.id for group in self.browse(cr, uid, ids, context=context) if group.action]
res = super(mail_group, self).unlink(cr, uid, ids, context=context)
mail_alias.unlink(cr, uid, alias_ids, context=context)
+ act_obj.unlink(cr, uid, action_ids, context=context)
return res
def write(self, cr, uid, ids, vals, context=None):
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp