flectra/addons/sale_crm/views/crm_lead_views.xml

49 lines
2.9 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
2018-01-16 11:34:37 +01:00
<flectra>
<record id="crm_case_form_view_oppor" model="ir.ui.view">
<field name="name">crm.lead.oppor.inherited.crm</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_case_form_view_oppor"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='action_set_won']" position="before">
<button string="New Quotation" name="%(sale_action_quotations_new)d" type="action" class="oe_highlight"
context="{'search_default_partner_id': partner_id,
'default_partner_id': partner_id,
'default_team_id': team_id,
'default_campaign_id': campaign_id,
'default_medium_id': medium_id,
'default_source_id': source_id}"/>
</xpath>
<button name="toggle_active" position="before">
<button class="oe_stat_button" type="action"
name="%(sale_action_quotations)d" icon="fa-pencil-square-o"
context="{'default_partner_id': partner_id, 'search_default_draft': 1}">
<div class="o_stat_info">
<field name="sale_number" class="o_stat_value"/>
<span class="o_stat_text"> Quotation(s) </span>
</div>
</button>
<button class="oe_stat_button" type="action" attrs="{'invisible': [('sale_amount_total', '=', 0)]}"
name="%(sale_action_orders)d" icon="fa-usd"
context="{'search_default_partner_id': partner_id, 'default_partner_id': partner_id, 'search_default_sales': 1}">
<div class="o_field_widget o_stat_info">
<span class="o_stat_value"><field name="sale_amount_total" widget="monetary" options="{'currency_field': 'company_currency'}"/></span>
<span class="o_stat_text"> Orders</span>
</div>
</button>
</button>
</field>
</record>
<!-- add needaction_menu_ref to reload quotation needaction when opportunity needaction is reloaded -->
<record id="crm.crm_lead_opportunities" model="ir.actions.act_window">
<field name="context">{'default_type': 'opportunity', 'default_user_id': uid, 'needaction_menu_ref': 'sale.menu_sale_quotations'}</field>
</record>
<record id="sales_team.mail_activity_type_action_config_sales" model="ir.actions.act_window">
<field name="domain">['|', ('res_model_id', '=', False), ('res_model_id.model', 'in', ['crm.lead', 'sale.order', 'res.partner', 'product.template', 'product.product'])]</field>
</record>
2018-01-16 11:34:37 +01:00
</flectra>