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 3a764dbce13..99d3752529e 100644 --- a/addons/crm/crm_view.xml +++ b/addons/crm/crm_view.xml @@ -24,7 +24,7 @@ parent="base.menu_base_config" sequence="45" groups="base.group_sale_salesman"/> + parent="base.menu_reporting" sequence="1"/> @@ -86,7 +86,7 @@ - + @@ -102,7 +102,6 @@ @ - @@ -163,7 +162,7 @@

- Click to define a new sales team. + Click to define a new sales team.

Use sales team to organize your different salespersons or departments into separate teams. Each team will work in @@ -203,7 +202,7 @@

- + @@ -228,7 +227,7 @@ - + crm.case.categ.form @@ -238,7 +237,7 @@ - + @@ -297,7 +296,7 @@ + parent="base.menu_crm_config_lead"/> Cases by Sales Team @@ -354,13 +353,13 @@