summaryrefslogtreecommitdiff
path: root/addons/maintenance
diff options
context:
space:
mode:
authorKrupal Oza <koz@odoo.com>2020-04-16 13:55:32 +0000
committerYannick Tivisse <yti@odoo.com>2020-05-18 12:11:22 +0000
commit6d17897dffd97ad52ad933f3e95ac1236f605806 (patch)
treef7aef6d7d1ca6dbfe40df7473f2debe664f6ba05 /addons/maintenance
parentec29deb02445e237fb53f3106849f7ab327dd597 (diff)
[IMP] various: Clean the kanban view design
PURPOSE ========================= The goal of this task is to set up some kind of guidelines to make kanban views consistent. It is fine having different kanban views, but if a UI element is shared among several kanban views, it should behave/look the same so the user knows what to expect. Kanban views can be split into two types: ==> 'documents' kanbans, such as res.partner, crm.lead, etc. - those records are created/edited often, numerous - 'opening' the card means accessing the record ==> 'dashboard' kanbans,such as stock.picking.type,account.journal, etc. - those records are not created/edited often, there are much less numerous - usually presented as dashboard, where 'opening' the card means accessing a set of related 'documents' (clicking on a account.journal to access account.move, or stock.picking.type to access stock.picking) - configuration of the 'card record' is done through a dropdown to access configuration Here are some guidelines for consistency. Bear in mind that those are not rules, but guidelines for consistency that we'd like to keep in mind when designing. ==> 'documents' kanbans - the record is accessed through global click - the user avatar is at the bottom right - the activity widget is at the bottom left (in last position if there are other elements) ==> 'dashboard' kanbans - the record is accessed through a 'Configuration' option in the card dropdown - there is no global click, and therefore no focus shadow - the dropdown icon (o_kanban_manage_toggle_button) is always visible, with icon fa-ellipsis-v - the listview counterpart should be presented as a dedicated configuration menu, and shouldn't be in the 'dashboard action' - links in the body of the card are structured as follows: link with <count>+label, then any additional aggregated metrics (not link) to the right example https://drive.google.com/file/d/1ZP6HDHTtC7cQ6rDWgqLoPs6U8JCeNVkW/view?usp=sharing ==> global guidelines - the title font color is #212529, with 500 weight - the subtitle font color is #666666, with 400 weight - the font size is 1.083rem - text overflow is handled through linebreak, not ellipsis - numerical values are aligned to the right - the kanban state widget is at the bottom right SPECIFICATION ================= AS per guidelines Improved follwing kanban/dashbaord view - hr_job - hr_department - hr_work_entry - hr_appraisal - fleet_vehicle - product_template - sale_subscription_template - crm_team - res_partner - event - stock_picking_type - mrp_eco_type - maintenance_team - quality_alert_team - account_journal Added the department menu on employee with default kanban view Added sequence in hr_work_entry list view TaskID: 2206372 Related Enterprise PR: https://github.com/odoo/enterprise/pull/10341 Closes: #50536
Diffstat (limited to 'addons/maintenance')
-rw-r--r--addons/maintenance/views/maintenance_views.xml54
1 files changed, 22 insertions, 32 deletions
diff --git a/addons/maintenance/views/maintenance_views.xml b/addons/maintenance/views/maintenance_views.xml
index 22d5233ecd8..58e80c56c6d 100644
--- a/addons/maintenance/views/maintenance_views.xml
+++ b/addons/maintenance/views/maintenance_views.xml
@@ -840,39 +840,29 @@
</button>
</div>
<div class="col-6 o_kanban_primary_right">
- <div class="row">
- <div class="col-9">
- <a name="%(hr_equipment_request_action_cal)d" type="action">
- Scheduled
- </a>
- </div>
- <div class="col-3">
+ <div t-if="record.todo_request_count_date.raw_value > 0">
+ <a name="%(hr_equipment_request_action_cal)d" type="action">
<t t-esc="record.todo_request_count_date.value"/>
- </div>
- <div class="col-9">
- <a name="%(hr_equipment_todo_request_action_from_dashboard)d" type="action" context="{'search_default_high_priority': 1}">
- Top Priorities
- </a>
- </div>
- <div class="col-3">
+ Scheduled
+ </a>
+ </div>
+ <div t-if="record.todo_request_count_high_priority.raw_value > 0">
+ <a name="%(hr_equipment_todo_request_action_from_dashboard)d" type="action" context="{'search_default_high_priority': 1}">
<t t-esc="record.todo_request_count_high_priority.value"/>
- </div>
- <div class="col-9">
- <a name="%(hr_equipment_todo_request_action_from_dashboard)d" type="action" context="{'search_default_kanban_state_block': 1}">
- Blocked
- </a>
- </div>
- <div class="col-3">
+ Top Priorities
+ </a>
+ </div>
+ <div t-if="record.todo_request_count_block.raw_value > 0">
+ <a name="%(hr_equipment_todo_request_action_from_dashboard)d" type="action" context="{'search_default_kanban_state_block': 1}">
<t t-esc="record.todo_request_count_block.value"/>
- </div>
- <div class="col-9">
- <a name="%(hr_equipment_todo_request_action_from_dashboard)d" type="action" context="{'search_default_unscheduled': 1}">
- Unscheduled
- </a>
- </div>
- <div class="col-3">
+ Blocked
+ </a>
+ </div>
+ <div t-if="record.todo_request_count_unscheduled.raw_value > 0">
+ <a name="%(hr_equipment_todo_request_action_from_dashboard)d" type="action" context="{'search_default_unscheduled': 1}">
<t t-esc="record.todo_request_count_unscheduled.value"/>
- </div>
+ Unscheduled
+ </a>
</div>
</div>
</div>
@@ -880,7 +870,7 @@
<div class="row">
<div class="col-6 o_kanban_card_manage_section o_kanban_manage_view">
<div role="menuitem" class="o_kanban_card_manage_title">
- <span>View</span>
+ <span>Requests</span>
</div>
<div role="menuitem">
<a name="%(hr_equipment_todo_request_action_from_dashboard)d" type="action">
@@ -918,8 +908,8 @@
<div class="col-8" role="menuitem" aria-haspopup="true">
<ul role="menu" class="oe_kanban_colorpicker" data-field="color"/>
</div>
- <div role="menuitem" class="col-4 text-right">
- <a type="edit">Settings</a>
+ <div role="menuitem" class="col-4">
+ <a type="edit" class="dropdown-item">Configuration</a>
</div>
</div>
</div>