diff --git a/addons/crm/crm.py b/addons/crm/crm.py index eb602b98c09..368656224ac 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -115,7 +115,6 @@ class crm_case_section(osv.osv): 'code': fields.char('Code', size=8), 'active': fields.boolean('Active', help="If the active field is set to "\ "true, it will allow you to hide the sales team without removing it."), - 'allow_unlink': fields.boolean('Allow Delete', help="Allows to delete non draft cases"), 'change_responsible': fields.boolean('Reassign Escalated', help="When escalating to this team override the salesman with the team leader."), 'user_id': fields.many2one('res.users', 'Team Leader'), 'member_ids':fields.many2many('res.users', 'sale_member_rel', 'section_id', 'member_id', 'Team Members'), @@ -137,7 +136,6 @@ class crm_case_section(osv.osv): _defaults = { 'active': 1, - 'allow_unlink': 1, 'stage_ids': _get_stage_common, 'alias_domain': False, # always hide alias during creation } diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 64ba9476701..547b25af27c 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -779,14 +779,6 @@ class crm_lead(base_stage, format_address, osv.osv): } return res - def unlink(self, cr, uid, ids, context=None): - for lead in self.browse(cr, uid, ids, context): - if (not lead.section_id.allow_unlink) and (lead.state != 'draft'): - raise osv.except_osv(_('Error!'), - _("You cannot delete lead '%s' because it is not in 'Draft' state. " \ - "You can still cancel it, instead of deleting it.") % lead.name) - return super(crm_lead, self).unlink(cr, uid, ids, context) - def write(self, cr, uid, ids, vals, context=None): if vals.get('stage_id') and not vals.get('probability'): # change probability of lead(s) if required by stage diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml index 5fa647f7253..99d3752529e 100644 --- a/addons/crm/crm_view.xml +++ b/addons/crm/crm_view.xml @@ -102,7 +102,6 @@ @ -