From caea6a69937dd593f3fd4723222f6aa432cbb0b9 Mon Sep 17 00:00:00 2001 From: Jigar Amin - OpenERP Date: Thu, 5 Jul 2012 12:29:39 +0530 Subject: [PATCH] [FIX] _inherits meo field on delete restrit to avoid traceback from server bzr revid: jam@tinyerp.com-20120705065939-75xnhvgc9sn5htcl --- addons/crm/crm.py | 2 +- addons/hr_recruitment/hr_recruitment.py | 2 +- addons/mail/mail_group.py | 2 +- addons/mail/res_users.py | 2 +- addons/project/project.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/crm/crm.py b/addons/crm/crm.py index e1fa87d2e5b..0696ace5239 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -122,7 +122,7 @@ class crm_case_section(osv.osv): 'note': fields.text('Description'), 'working_hours': fields.float('Working Hours', digits=(16,2 )), 'stage_ids': fields.many2many('crm.case.stage', 'section_stage_rel', 'section_id', 'stage_id', 'Stages'), - 'alias_id': fields.many2one('mail.alias', 'Mail Alias', ondelete="cascade", required=True, + 'alias_id': fields.many2one('mail.alias', 'Mail Alias', ondelete="restrict", required=True, help="This Unique Mail Box Alias of the Sales Team allows to manage the Seamless email communication between Mail Box and OpenERP," "This Alias MailBox also create and Manage the new Email Leads for this Sales Team and also manage the existing Lead email communication."), } diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 4251b29f2fd..dd9f7cf5844 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -552,7 +552,7 @@ class hr_job(osv.osv): _inherits = {'mail.alias': 'alias_id'} _columns = { 'survey_id': fields.many2one('survey', 'Interview Form', help="Choose an interview form for this job position and you will be able to print/answer this interview from all applicants who apply for this job"), - 'alias_id': fields.many2one('mail.alias', 'Mail Alias', ondelete="cascade", required=True, + 'alias_id': fields.many2one('mail.alias', 'Mail Alias', ondelete="restrict", required=True, help="This Unique Mail Box Alias of the Job allows to manage the Seamless email communication between Mail Box and OpenERP," "This Alias MailBox also create and Manage the new Email applicant for this job and also manage the existing applicant email communication."), } diff --git a/addons/mail/mail_group.py b/addons/mail/mail_group.py index 9cbaaa7892b..dceb3d43a5c 100644 --- a/addons/mail/mail_group.py +++ b/addons/mail/mail_group.py @@ -130,7 +130,7 @@ class mail_group(osv.osv): 'member_count': fields.function(get_member_ids, type='integer', string='Member count', multi='get_member_ids'), 'is_subscriber': fields.function(get_member_ids, type='boolean', string='Joined', multi='get_member_ids'), 'last_month_msg_nbr': fields.function(get_last_month_msg_nbr, type='integer', string='Messages count for last month'), - 'alias_id': fields.many2one('mail.alias', 'Mail Alias', ondelete="cascade", required=True, + 'alias_id': fields.many2one('mail.alias', 'Mail Alias', ondelete="restrict", required=True, help="This Unique Mail Box Alias of the Group allows to manage the Seamless email communication between Mail Box and OpenERP," "This Alias MailBox manage the Group email communication.") } diff --git a/addons/mail/res_users.py b/addons/mail/res_users.py index e30f84fc70e..047d1affc00 100644 --- a/addons/mail/res_users.py +++ b/addons/mail/res_users.py @@ -40,7 +40,7 @@ class res_users(osv.osv): ('none', 'Never') ], 'Receive Feeds by Email', required=True, help="Choose in which case you want to receive an email when you receive new feeds."), - 'alias_id': fields.many2one('mail.alias', 'Mail Alias', ondelete="cascade", required=True, + 'alias_id': fields.many2one('mail.alias', 'Mail Alias', ondelete="restrict", required=True, help="This Unique Mail Box Alias of the User allows to manage the Seamless email communication between Mail Box and OpenERP," "This Alias MailBox manage the Users email communication."), } diff --git a/addons/project/project.py b/addons/project/project.py index c58a767da66..633bb944df3 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -217,7 +217,7 @@ class project(osv.osv): 'type_ids': fields.many2many('project.task.type', 'project_task_type_rel', 'project_id', 'type_id', 'Tasks Stages', states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), 'task_count': fields.function(_task_count, type='integer', string="Open Tasks"), 'color': fields.integer('Color Index'), - 'alias_id': fields.many2one('mail.alias', 'Mail Alias', ondelete="cascade", required=True, + 'alias_id': fields.many2one('mail.alias', 'Mail Alias', ondelete="restrict", required=True, help="This Unique Mail Box Alias of the Project allows to manage the Seamless email communication between Mail Box and OpenERP," "This Alias MailBox also create and Manage the new Email Tasks/Issues for this Project and also manage the existing Task/Issue email communication."), 'alias_model': fields.selection(_get_alias_model, "Alias Model",select="1", required=True,