Skip to content
Permalink
Browse files

[IMP] crm: improve naming of main crm lead action

Task 2070287
  • Loading branch information...
tde-banana-odoo committed Sep 11, 2019
1 parent 525fa5a commit 058f289a119ddb46f52779901029c9ee3ba1a548
Showing with 14 additions and 14 deletions.
  1. +1 −1 addons/crm/models/crm_team.py
  2. +2 −2 addons/crm/models/digest.py
  3. +11 −11 addons/crm/views/crm_lead_views.xml
@@ -105,7 +105,7 @@ def write(self, vals):
#TODO JEM : refactor this stuff with xml action, proper customization,
@api.model
def action_your_pipeline(self):
action = self.env.ref('crm.crm_lead_opportunities_tree_view').read()[0]
action = self.env.ref('crm.crm_lead_action_pipeline').read()[0]
user_team_id = self.env.user.sale_team_id.id
if not user_team_id:
user_team_id = self.search([], limit=1).id
@@ -39,8 +39,8 @@ def _compute_kpi_crm_opportunities_won_value(self):

def compute_kpis_actions(self, company, user):
res = super(Digest, self).compute_kpis_actions(company, user)
res['kpi_crm_lead_created'] = 'crm.crm_lead_opportunities_tree_view&menu_id=%s' % self.env.ref('crm.crm_menu_root').id
res['kpi_crm_opportunities_won'] = 'crm.crm_lead_opportunities_tree_view&menu_id=%s' % self.env.ref('crm.crm_menu_root').id
res['kpi_crm_lead_created'] = 'crm.crm_lead_action_pipeline&menu_id=%s' % self.env.ref('crm.crm_menu_root').id
res['kpi_crm_opportunities_won'] = 'crm.crm_lead_action_pipeline&menu_id=%s' % self.env.ref('crm.crm_menu_root').id
if user.has_group('crm.group_use_lead'):
res['kpi_crm_lead_created'] = 'crm.crm_lead_all_leads&menu_id=%s' % self.env.ref('crm.crm_menu_root').id
return res
@@ -950,7 +950,7 @@ if record:
<field name="code">action = model.action_your_pipeline()</field>
</record>

<record model="ir.actions.act_window" id="crm_lead_opportunities_tree_view">
<record model="ir.actions.act_window" id="crm_lead_action_pipeline">
<field name="name">Pipeline</field>
<field name="res_model">crm.lead</field>
<field name="view_mode">kanban,tree,graph,pivot,form,calendar,activity</field>
@@ -962,39 +962,39 @@ if record:
<field name="search_view_id" ref="crm.view_crm_case_opportunities_filter"/>
</record>

<record id="crm_lead_opportunities_tree_view_view_kanban" model="ir.actions.act_window.view">
<record id="crm_lead_action_pipeline_view_kanban" model="ir.actions.act_window.view">
<field name="sequence" eval="0"/>
<field name="view_mode">kanban</field>
<field name="view_id" ref="crm_case_kanban_view_leads"/>
<field name="act_window_id" ref="crm_lead_opportunities_tree_view"/>
<field name="act_window_id" ref="crm_lead_action_pipeline"/>
</record>

<record id="crm_lead_opportunities_tree_view_view_tree" model="ir.actions.act_window.view">
<record id="crm_lead_action_pipeline_view_tree" model="ir.actions.act_window.view">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm.crm_case_tree_view_oppor"/>
<field name="act_window_id" ref="crm_lead_opportunities_tree_view"/>
<field name="act_window_id" ref="crm_lead_action_pipeline"/>
</record>

<record id="crm_lead_opportunities_tree_view_view_calendar" model="ir.actions.act_window.view">
<record id="crm_lead_action_pipeline_view_calendar" model="ir.actions.act_window.view">
<field name="sequence" eval="2"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view_leads"/>
<field name="act_window_id" ref="crm_lead_opportunities_tree_view"/>
<field name="act_window_id" ref="crm_lead_action_pipeline"/>
</record>

<record id="crm_lead_opportunities_tree_view_view_pivot" model="ir.actions.act_window.view">
<record id="crm_lead_action_pipeline_view_pivot" model="ir.actions.act_window.view">
<field name="sequence" eval="3"/>
<field name="view_mode">pivot</field>
<field name="view_id" ref="crm_lead_view_pivot"/>
<field name="act_window_id" ref="crm_lead_opportunities_tree_view"/>
<field name="act_window_id" ref="crm_lead_action_pipeline"/>
</record>

<record id="crm_lead_opportunities_tree_view_view_graph" model="ir.actions.act_window.view">
<record id="crm_lead_action_pipeline_view_graph" model="ir.actions.act_window.view">
<field name="sequence" eval="5"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_lead_view_graph"/>
<field name="act_window_id" ref="crm_lead_opportunities_tree_view"/>
<field name="act_window_id" ref="crm_lead_action_pipeline"/>
</record>

<menuitem

0 comments on commit 058f289

Please sign in to comment.
You can’t perform that action at this time.