[FIX] sale-crm: default filters for stats button
As the stat button "Quotes(s)" counts Quotations only (draft SO), and the stat button "Orders" sum the total of Sales orders only (confirmed SO), clicking on the buttons should open the SO list with the according filters set. Closes #9715 opw-660041
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
<div name="button_box" position="inside">
|
||||
<button class="oe_stat_button" type="action"
|
||||
name="%(sale_action_quotations)d" icon="fa-usd"
|
||||
context="{'default_partner_id': partner_id}">
|
||||
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"> Quote(s) </span>
|
||||
@@ -44,7 +44,7 @@
|
||||
</button>
|
||||
<button class="oe_stat_button" type="action" attrs="{'invisible': [('sale_amount_total', '=', 0)]}"
|
||||
name="%(sale_action_quotations)d" icon="fa-usd"
|
||||
context="{'search_default_partner_id': partner_id, 'default_partner_id': partner_id}">
|
||||
context="{'search_default_partner_id': partner_id, 'default_partner_id': partner_id, 'search_default_sales': 1}">
|
||||
<div class="o_form_field 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>
|
||||
|
||||
Reference in New Issue
Block a user