diff options
| author | Yannick Tivisse <yti@odoo.com> | 2015-05-11 16:56:04 +0200 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2015-07-08 15:39:02 +0200 |
| commit | 55ae657239cb968d438056202ed2acee12b3fba2 (patch) | |
| tree | 6f73d7562a2573a85ea5e90fc85bcbc4b3c233a3 /addons | |
| parent | 6c64869de127508f612a2bd1bb48c28183c51868 (diff) | |
[IMP] sales_team : Remove the lead escalation feature
Conflicts:
addons/crm/sales_team_view.xml
addons/sales_team/sales_team.py
addons/sales_team/sales_team.xml
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/crm/crm_lead.py | 14 | ||||
| -rw-r--r-- | addons/crm/crm_lead_view.xml | 5 | ||||
| -rw-r--r-- | addons/crm/sales_team_view.xml | 4 | ||||
| -rw-r--r-- | addons/crm/test/crm_lead_cancel.yml | 10 | ||||
| -rw-r--r-- | addons/crm_helpdesk/crm_helpdesk.py | 6 | ||||
| -rw-r--r-- | addons/sales_team/sales_team.py | 3 | ||||
| -rw-r--r-- | addons/sales_team/sales_team.xml | 3 |
7 files changed, 14 insertions, 31 deletions
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index e71a2e21a24..f2e5fc00ccd 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -381,20 +381,6 @@ class crm_lead(format_address, osv.osv): self.write(cr, uid, lead_ids, {'stage_id': stage_id}, context=context) return True - def case_escalate(self, cr, uid, ids, context=None): - """ Escalates case to parent level """ - for case in self.browse(cr, uid, ids, context=context): - data = {'active': True} - if case.team_id.parent_id: - data['team_id'] = case.team_id.parent_id.id - if case.team_id.parent_id.change_responsible: - if case.team_id.parent_id.user_id: - data['user_id'] = case.team_id.parent_id.user_id.id - else: - raise UserError(_("You are already at the top level of your sales-team category.\nTherefore you cannot escalate furthermore.")) - self.write(cr, uid, [case.id], data, context=context) - return True - def _merge_get_result_type(self, cr, uid, opps, context=None): """ Define the type of the result of the merge. If at least one of the diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index bf0258bcffe..88370b0965f 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -167,9 +167,6 @@ <label for="team_id" groups="base.group_multi_salesteams"/> <div class="o_row" groups="base.group_multi_salesteams"> <field name="team_id"/> - <button name="case_escalate" string="Escalate" - type="object" class="oe_link" - attrs="{'invisible': ['|', ('team_id','=',False), ('probability', '=', 100)]}"/> </div> <field name="type" invisible="1"/> </group> @@ -457,8 +454,6 @@ <label for="team_id" groups="base.group_multi_salesteams"/> <div groups="base.group_multi_salesteams" class="o_row"> <field name="team_id" widget="selection"/> - <button name="case_escalate" string="Escalate" type="object" class="oe_link" - attrs="{'invisible': ['|', ('team_id','=',False), ('probability', '=', 100)]}"/> </div> </group> <group> diff --git a/addons/crm/sales_team_view.xml b/addons/crm/sales_team_view.xml index 2c1a343350b..38b18f4ce11 100644 --- a/addons/crm/sales_team_view.xml +++ b/addons/crm/sales_team_view.xml @@ -94,8 +94,8 @@ <field name="stage_ids"/> </page> </xpath> - <xpath expr="//group[@name='sales_team_escalation_group']" position="after"> - <group name="alias_info" string="Leads Email Alias" attrs="{'invisible': [('alias_domain', '=', False)]}"> + <xpath expr="//field[@name='active']" position="before"> + <group name="alias_info" string="Leads Email Alias" class="oe_inline" attrs="{'invisible': [('alias_domain', '=', False)]}"> <label for="alias_name" string="Email Alias" attrs="{'invisible': [('alias_domain', '=', False)]}"/> <div name="alias_def" diff --git a/addons/crm/test/crm_lead_cancel.yml b/addons/crm/test/crm_lead_cancel.yml index 8d3518b77be..0d062cf0026 100644 --- a/addons/crm/test/crm_lead_cancel.yml +++ b/addons/crm/test/crm_lead_cancel.yml @@ -12,13 +12,3 @@ - !assert {model: crm.lead, id: crm.crm_case_1, string: Lead is in new stage}: - stage_id.sequence == 1 -- - Salesman escalate the lead to parent team. -- - !python {model: crm.lead}: | - self.case_escalate(cr, uid, [ref("crm_case_1")]) -- - Salesman check the lead is correctly escalated to the parent team. -- - !assert {model: crm.lead, id: crm.crm_case_1, string: Escalate lead to parent team}: - - team_id.name == "Marketing" diff --git a/addons/crm_helpdesk/crm_helpdesk.py b/addons/crm_helpdesk/crm_helpdesk.py index 694441a3186..044ad113142 100644 --- a/addons/crm_helpdesk/crm_helpdesk.py +++ b/addons/crm_helpdesk/crm_helpdesk.py @@ -130,3 +130,9 @@ class crm_helpdesk_category(osv.Model): 'name': fields.char('Name', required=True, translate=True), 'team_id': fields.many2one('crm.team', 'Sales Team'), } + +class sales_team(osv.Model): + _inherit = "crm.team" + _columns = { + 'change_responsible': fields.boolean('Reassign Escalated', help="When escalating to this team override the salesman with the team leader."), + } diff --git a/addons/sales_team/sales_team.py b/addons/sales_team/sales_team.py index f5bf2aef52a..aca9573c773 100644 --- a/addons/sales_team/sales_team.py +++ b/addons/sales_team/sales_team.py @@ -44,8 +44,11 @@ class crm_team(osv.Model): '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."), +<<<<<<< HEAD 'company_id': fields.many2one('res.company', 'Company'), 'change_responsible': fields.boolean('Reassign Escalated', help="When escalating to this team override the salesman with the team leader."), +======= +>>>>>>> 7857b36... [IMP] sales_team : Remove the lead escalation feature 'user_id': fields.many2one('res.users', 'Team Leader'), 'member_ids': fields.many2many('res.users', 'sale_member_rel', 'team_id', 'member_id', 'Team Members'), 'reply_to': fields.char('Reply-To', size=64, help="The email address put in the 'Reply-To' of all emails sent by Odoo about cases in this sales team"), diff --git a/addons/sales_team/sales_team.xml b/addons/sales_team/sales_team.xml index d0f438f52ca..09afb49664f 100644 --- a/addons/sales_team/sales_team.xml +++ b/addons/sales_team/sales_team.xml @@ -92,10 +92,13 @@ </page> <page string="More Info" groups="base.group_sale_manager"> <group name="sales_team_more_info"> +<<<<<<< HEAD <group string="Escalation" name="sales_team_escalation_group"> <field name="parent_id"/> <field name="change_responsible"/> </group> +======= +>>>>>>> 7857b36... [IMP] sales_team : Remove the lead escalation feature <group> <field name="active"/> <field name="company_id" groups="base.group_multi_company" |
