From 376891294788706753b056f0151d198f0a493c64 Mon Sep 17 00:00:00 2001 From: "Tiffany Chang (tic)" Date: Mon, 6 Apr 2020 11:26:40 +0000 Subject: [PATCH] [IMP] Improve purchase KPIs UX Minor improvements/fixes: - Prevent overlap of 'o_view_nocontent' (when there are no relevant records) with kpis table in list/kanban views on small screens/windows. - Create separate list views to prevent kpis table appearing in appropriate situations (e.g. action windows showing linkages between purchase orders and other models.) - Override bootstrap styling that was making kpi table wider than the width of the window in list view. closes odoo/odoo#49509 Task: 2228175 X-original-commit: ee831f7aff400f76e20e54b7cb9b5610bcec4839 Signed-off-by: Simon Lejeune (sle) --- addons/purchase/static/src/scss/purchase.scss | 11 ++++++ addons/purchase/views/purchase_views.xml | 35 +++++++++++++++++-- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/addons/purchase/static/src/scss/purchase.scss b/addons/purchase/static/src/scss/purchase.scss index dadb3972fc0..003bb0a488e 100644 --- a/addons/purchase/static/src/scss/purchase.scss +++ b/addons/purchase/static/src/scss/purchase.scss @@ -6,6 +6,11 @@ position: relative; max-width:100%; + .row { + margin-right: 0; + margin-left: 0; + } + .o_dashboard_action { cursor: pointer; } @@ -47,3 +52,9 @@ } } } + +.o_purchase_dashboard ~ .o_view_nocontent { + // To prevent overlapping from inherited values + position: relative; + width: 100%; +} diff --git a/addons/purchase/views/purchase_views.xml b/addons/purchase/views/purchase_views.xml index d3522119724..9f61fd92fd0 100644 --- a/addons/purchase/views/purchase_views.xml +++ b/addons/purchase/views/purchase_views.xml @@ -485,6 +485,37 @@ purchase.order.tree purchase.order + + + + + + + + + + + + + + + + + + + + + + + + + + purchase.order.inherit.purchase.order.tree + purchase.order + @@ -555,7 +586,7 @@ ir.actions.act_window purchase.order tree,kanban,form,pivot,graph,calendar,activity - + [] {'quotation_only': True} @@ -686,7 +717,7 @@ Requests for Quotation purchase.order form,tree,kanban,pivot,graph,calendar,activity - + main