[REF] purchase: little refactor purchase dashboard
To avoid dynamically building xml_id names, in the purchase dashboard, remove the name attr used to construct dynamically the action xml_id. In any case, it was all the same, then just put it in the js. closes odoo/odoo#56211 Related: odoo/upgrade#1704 Related: odoo/enterprise#12553 Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
This commit is contained in:
@@ -63,7 +63,7 @@ var PurchaseListDashboardRenderer = ListRenderer.extend({
|
||||
e.preventDefault();
|
||||
var $action = $(e.currentTarget);
|
||||
this.trigger_up('dashboard_open_action', {
|
||||
action_name: $action.attr('name')+"_list",
|
||||
action_name: "purchase.dashboard_open_action_list",
|
||||
action_context: $action.attr('context'),
|
||||
});
|
||||
},
|
||||
@@ -178,7 +178,7 @@ var PurchaseKanbanDashboardRenderer = KanbanRenderer.extend({
|
||||
e.preventDefault();
|
||||
var $action = $(e.currentTarget);
|
||||
this.trigger_up('dashboard_open_action', {
|
||||
action_name: $action.attr('name')+"_kanban",
|
||||
action_name: "purchase.purchase_action_dashboard_kanban",
|
||||
action_context: $action.attr('context'),
|
||||
});
|
||||
},
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
<td class="o_text">
|
||||
<div>All RFQs</div>
|
||||
</td>
|
||||
<td class="o_main o_dashboard_action" title="All Draft RFQs" name="purchase.purchase_action_dashboard" context='{"search_default_draft_rfqs": true}'>
|
||||
<td class="o_main o_dashboard_action" title="All Draft RFQs" context='{"search_default_draft_rfqs": true}'>
|
||||
<a href="#"><t t-esc="values['all_to_send']"/><br/>To Send</a>
|
||||
</td>
|
||||
<td class="o_main o_dashboard_action" title="All Waiting RFQs" name="purchase.purchase_action_dashboard" context='{"search_default_waiting_rfqs": true}'>
|
||||
<td class="o_main o_dashboard_action" title="All Waiting RFQs" context='{"search_default_waiting_rfqs": true}'>
|
||||
<a href="#"><t t-esc="values['all_waiting']"/><br/>Waiting</a>
|
||||
</td>
|
||||
<td class="o_main o_dashboard_action" title="All Late RFQs" name="purchase.purchase_action_dashboard" context='{"search_default_late_rfqs": true}'>
|
||||
<td class="o_main o_dashboard_action" title="All Late RFQs" context='{"search_default_late_rfqs": true}'>
|
||||
<a href="#"><t t-esc="values['all_late']"/><br/>Late</a>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -29,13 +29,13 @@
|
||||
<td class="o_text">
|
||||
<div>My RFQs</div>
|
||||
</td>
|
||||
<td class="o_main o_dashboard_action" title="My Draft RFQs" name="purchase.purchase_action_dashboard" context='{"search_default_draft_rfqs": true, "search_default_my_purchases": true}'>
|
||||
<td class="o_main o_dashboard_action" title="My Draft RFQs" context='{"search_default_draft_rfqs": true, "search_default_my_purchases": true}'>
|
||||
<a href="#"><t t-esc="values['my_to_send']"/></a>
|
||||
</td>
|
||||
<td class="o_main o_dashboard_action" title="My Waiting RFQs" name="purchase.purchase_action_dashboard" context='{"search_default_waiting_rfqs": true, "search_default_my_purchases": true}'>
|
||||
<td class="o_main o_dashboard_action" title="My Waiting RFQs" context='{"search_default_waiting_rfqs": true, "search_default_my_purchases": true}'>
|
||||
<a href="#"><t t-esc="values['my_waiting']"/></a>
|
||||
</td>
|
||||
<td class="o_main o_dashboard_action" title="My Late RFQs" name="purchase.purchase_action_dashboard" context='{"search_default_late_rfqs": true, "search_default_my_purchases": true}'>
|
||||
<td class="o_main o_dashboard_action" title="My Late RFQs" context='{"search_default_late_rfqs": true, "search_default_my_purchases": true}'>
|
||||
<a href="#"><t t-esc="values['my_late']"/></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user