[FIX] project, mrp, website_slides: improve status buttons layout
Related to commit 45b9e04.
This commit fixes the overflowing status buttons in the MRP module's
Workcenter view. It also adapts the font-size of one of the status
buttons texts in website_slides by wrapping it inside the usual
structure: .o_stat_info > .o_stat_text`.
The same fixes were done for project, stock and sale_timesheet
task-3326558
part of task-3326263
closes odoo/odoo#127555
X-original-commit: odoo/odoo@f0b3806
Related: odoo/enterprise#43726
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
This commit is contained in:
committed by
Pierre Paridans
parent
ef05b6ef55
commit
7f205c23d7
@@ -299,20 +299,24 @@
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<field name="has_routing_lines" invisible="1"/>
|
||||
<button string="Operations" type="object"
|
||||
<button type="object"
|
||||
name="action_show_operations"
|
||||
attrs="{'invisible': [('has_routing_lines', '=', False)]}"
|
||||
context="{'default_workcenter_id': active_id}"
|
||||
class="oe_stat_button" icon="fa-cog"/>
|
||||
class="oe_stat_button" icon="fa-cog">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">Operations</span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="%(mrp_workcenter_productivity_report_oee)d" type="action" class="oe_stat_button" icon="fa-pie-chart">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="oee" widget="statinfo" nolabel="1"/>%</span>
|
||||
<span class="o_stat_value"><field name="oee" nolabel="1"/>%</span>
|
||||
<span class="o_stat_text">OEE</span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="%(mrp_workcenter_productivity_report_blocked)d" type="action" class="oe_stat_button" icon="fa-bar-chart">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="blocked_time" widget="statinfo" nolabel="1"/> Hours</span>
|
||||
<span class="o_stat_value"><field name="blocked_time" nolabel="1"/> Hours</span>
|
||||
<span class="o_stat_text">Lost</span>
|
||||
</div>
|
||||
</button>
|
||||
@@ -323,13 +327,13 @@
|
||||
'search_default_pending': True,
|
||||
'search_default_progress': True}">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="workcenter_load" widget="statinfo" nolabel="1"/> Minutes</span>
|
||||
<span class="o_stat_value"><field name="workcenter_load" nolabel="1"/> Minutes</span>
|
||||
<span class="o_stat_text">Load</span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="%(mrp_workorder_report)d" type="action" class="oe_stat_button" icon="fa-bar-chart" context="{'search_default_workcenter_id': id, 'search_default_thisyear': True}">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="performance" widget="statinfo" nolabel="1"/>%</span>
|
||||
<span class="o_stat_value"><field name="performance" nolabel="1"/>%</span>
|
||||
<span class="o_stat_text">Performance</span>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
@@ -135,15 +135,14 @@
|
||||
<sheet string="Task">
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<field name="display_parent_task_button" invisible="1"/>
|
||||
<button name="action_project_sharing_view_parent_task" type="object" class="oe_stat_button" icon="fa-tasks" string="Parent Task" attrs="{'invisible': [('display_parent_task_button', '=', False)]}"/>
|
||||
<button name="action_project_sharing_view_parent_task" type="object" class="oe_stat_button" icon="fa-tasks" attrs="{'invisible': [('display_parent_task_button', '=', False)]}">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">Parent Task</span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="action_project_sharing_open_subtasks" type="object" class="oe_stat_button" icon="fa-tasks"
|
||||
attrs="{'invisible' : ['|', ('id', '=', False), ('subtask_count', '=', 0)]}" context="{'default_user_ids': [(6, 0, [uid])]}">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="subtask_count" widget="statinfo" nolabel="1"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Sub-tasks</span>
|
||||
</div>
|
||||
<field name="subtask_count" widget="statinfo" string="Sub-tasks"/>
|
||||
</button>
|
||||
</div>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
|
||||
|
||||
@@ -274,31 +274,20 @@
|
||||
</button>
|
||||
<!-- Dummy tag used to organize buttons -->
|
||||
<span id="end_rating_buttons" invisible="1"/>
|
||||
<button name="action_open_parent_task" type="object" class="oe_stat_button" icon="fa-tasks" string="Parent Task" attrs="{'invisible': [('parent_id', '=', False)]}"/>
|
||||
<button name="action_recurring_tasks" type="object" attrs="{'invisible': ['|', ('active', '=', False), ('recurrence_id', '=', False)]}" class="oe_stat_button" icon="fa-repeat" groups="project.group_project_recurring_tasks">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_text">Recurring Tasks</span>
|
||||
<span class="o_stat_value">
|
||||
<field name="recurring_count" widget="statinfo" nolabel="1" />
|
||||
</span>
|
||||
<button name="action_open_parent_task" type="object" class="oe_stat_button" icon="fa-tasks" attrs="{'invisible': [('parent_id', '=', False)]}">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">Parent Task</span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="action_recurring_tasks" type="object" attrs="{'invisible': ['|', ('active', '=', False), ('recurrence_id', '=', False)]}" class="oe_stat_button" icon="fa-repeat" groups="project.group_project_recurring_tasks">
|
||||
<field name="recurring_count" widget="statinfo" string="Recurring Tasks"/>
|
||||
</button>
|
||||
<button name="%(project_task_action_sub_task)d" type="action" class="oe_stat_button" icon="fa-tasks"
|
||||
attrs="{'invisible' : ['|', ('id', '=', False), ('subtask_count', '=', 0)]}" context="{'default_user_ids': user_ids, 'default_project_id': project_id, 'default_milestone_id': milestone_id}">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="subtask_count" widget="statinfo" nolabel="1"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Sub-tasks</span>
|
||||
</div>
|
||||
<field name="subtask_count" widget="statinfo" string="Sub-tasks"/>
|
||||
</button>
|
||||
<button name="action_dependent_tasks" type="object" attrs="{'invisible': [('dependent_tasks_count', '=', 0)]}" class="oe_stat_button" icon="fa-tasks" groups="project.group_project_task_dependencies">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_text">Blocking Tasks</span>
|
||||
<span class="o_stat_value ">
|
||||
<field name="dependent_tasks_count" widget="statinfo" nolabel="1" />
|
||||
</span>
|
||||
</div>
|
||||
<field name="dependent_tasks_count" widget="statinfo" string="Blocking Tasks" />
|
||||
</button>
|
||||
<!-- Dummy tag used to organize buttons -->
|
||||
<span id="end_button_box" invisible="1"/>
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<button name="%(sale_timesheet.action_timesheet_from_invoice)d" type="action" class="oe_stat_button" icon="fa-clock-o" attrs="{'invisible': [('timesheet_count', '=', 0)]}" groups="hr_timesheet.group_hr_timesheet_user">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="timesheet_total_duration" class="mr4" widget="statinfo" nolabel="1"/>
|
||||
<field name="timesheet_total_duration" class="mr4" nolabel="1"/>
|
||||
<field name="timesheet_encode_uom_id" options="{'no_open': True}"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Recorded</span>
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
attrs="{'invisible':[('show_on_hand_qty_status_button', '=', False)]}">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value d-flex gap-1">
|
||||
<field name="qty_available" widget="statinfo" nolabel="1" class="oe_inline"/>
|
||||
<field name="qty_available" nolabel="1" class="oe_inline"/>
|
||||
<field name="uom_name" class="oe_inline"/>
|
||||
</span>
|
||||
<span class="o_stat_text">On Hand</span>
|
||||
@@ -277,7 +277,7 @@
|
||||
class="oe_stat_button" icon="fa-area-chart">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value d-flex gap-1">
|
||||
<field name="virtual_available" widget="statinfo" nolabel="1" class="oe_inline"/>
|
||||
<field name="virtual_available" class="oe_inline"/>
|
||||
<field name="uom_name" class="oe_inline"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Forecasted</span>
|
||||
@@ -319,15 +319,26 @@
|
||||
class="oe_stat_button" icon="fa-refresh">
|
||||
<field name="nbr_reordering_rules" widget="statinfo"/>
|
||||
</button>
|
||||
<button string="Lot/Serial Numbers" type="object"
|
||||
<button type="object"
|
||||
name="action_open_product_lot"
|
||||
attrs="{'invisible': [('tracking', '=', 'none')]}"
|
||||
class="oe_stat_button" icon="fa-bars" groups="stock.group_production_lot"/>
|
||||
<button string="Putaway Rules" type="object"
|
||||
class="oe_stat_button" icon="fa-bars" groups="stock.group_production_lot">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">Lot/Serial Numbers</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="object"
|
||||
name="action_view_related_putaway_rules"
|
||||
class="oe_stat_button" icon="fa-random" groups="stock.group_stock_multi_locations"
|
||||
attrs="{'invisible': [('type', '=', 'service')]}"
|
||||
context="{'invisible_handle': True, 'single_product': True}"/>
|
||||
context="{
|
||||
'invisible_handle': True,
|
||||
'single_product': product_variant_count == 1,
|
||||
}">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">Putaway Rules</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="object" string="Storage Capacities"
|
||||
name="action_view_storage_category_capacity"
|
||||
groups="stock.group_stock_storage_categories"
|
||||
@@ -375,7 +386,7 @@
|
||||
class="oe_stat_button" icon="fa-cubes">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value d-flex gap-1">
|
||||
<field name="qty_available" widget="statinfo" nolabel="1" class="oe_inline"/>
|
||||
<field name="qty_available" nolabel="1" class="oe_inline"/>
|
||||
<field name="uom_name" class="oe_inline"/>
|
||||
</span>
|
||||
<span class="o_stat_text">On Hand</span>
|
||||
@@ -388,7 +399,7 @@
|
||||
class="oe_stat_button" icon="fa-area-chart">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value d-flex gap-1">
|
||||
<field name="virtual_available" widget="statinfo" nolabel="1" class="oe_inline"/>
|
||||
<field name="virtual_available" nolabel="1" class="oe_inline"/>
|
||||
<field name="uom_name" class="oe_inline"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Forecasted</span>
|
||||
@@ -452,7 +463,7 @@
|
||||
<span class="o_stat_text">Putaway Rules</span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="object"
|
||||
<button type="object"
|
||||
name="action_view_storage_category_capacity"
|
||||
groups="stock.group_stock_storage_categories"
|
||||
attrs="{'invisible':[('type', '=', 'service')]}"
|
||||
|
||||
@@ -14,12 +14,7 @@
|
||||
<button class="oe_stat_button" name="action_lot_open_transfers"
|
||||
type="object" icon="fa-truck" help="Transfers"
|
||||
attrs="{'invisible': [('delivery_count', '=', 0)]}">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="delivery_count" widget="statinfo" nolabel="1" class="mr4"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Transfers</span>
|
||||
</div>
|
||||
<field name="delivery_count" widget="statinfo" string="Transfers"/>
|
||||
</button>
|
||||
<button name="action_lot_open_quants" icon="fa-arrows" class="oe_stat_button" type="object">
|
||||
<div class="o_stat_info">
|
||||
|
||||
@@ -41,7 +41,12 @@
|
||||
icon="fa-graduation-cap"
|
||||
class="oe_stat_button"
|
||||
groups="website_slides.group_website_slides_officer">
|
||||
<field name="members_all_count" string="Attendees" widget="statinfo"/>
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="members_all_count" nolabel="1"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Attendees</span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="action_view_ratings"
|
||||
type="object"
|
||||
|
||||
@@ -53,32 +53,24 @@
|
||||
<button name="%(slide_slide_partner_action_from_slide)d"
|
||||
class="oe_stat_button" type="action" icon="fa-graduation-cap"
|
||||
attrs="{'invisible': [('slide_views', '=', 0)]}">
|
||||
<span class="o_stat_value">
|
||||
<field name="slide_views" widget="statinfo" nolabel="1"/> Attendees
|
||||
</span>
|
||||
<field name="slide_views" widget="statinfo" string="Attendees"/>
|
||||
</button>
|
||||
<button disabled="1" icon="fa-thumbs-up" class="oe_stat_button"
|
||||
attrs="{'invisible': ['|', ('channel_type', '=', 'training'), ('likes', '=', 0)]}">
|
||||
<span class="o_stat_value" >
|
||||
<field class="ms-1" name="likes" widget="statinfo" nolabel="1"/> Likes
|
||||
</span>
|
||||
<field class="ms-1" name="likes" widget="statinfo" string="Likes"/>
|
||||
</button>
|
||||
<button disabled="1" icon="fa-thumbs-down" class="oe_stat_button"
|
||||
attrs="{'invisible': ['|', ('channel_type', '=', 'training'), ('dislikes', '=', 0)]}">
|
||||
<span class="o_stat_value">
|
||||
<field class="ms-1" name="dislikes" widget="statinfo" nolabel="1"/> Dislikes
|
||||
</span>
|
||||
<field class="ms-1" name="dislikes" widget="statinfo" string="Dislikes"/>
|
||||
</button>
|
||||
<button disabled="1" icon="fa-comments" class="oe_stat_button"
|
||||
attrs="{'invisible': ['|', ('channel_allow_comment', '!=', True), ('comments_count','=', 0)]}">
|
||||
<span class="o_stat_value">
|
||||
<field class="ms-1" name="comments_count" widget="statinfo" nolabel="1"/> Comments
|
||||
</span>
|
||||
<field class="ms-1" name="comments_count" widget="statinfo" string="Comments"/>
|
||||
</button>
|
||||
<button name="action_view_embeds" class="oe_stat_button" type="object" icon="fa-share-alt"
|
||||
attrs="{'invisible': [('embed_count', '=', 0)]}">
|
||||
<div class="o_stat_info">
|
||||
<field name="embed_count"/>
|
||||
<span class="o_stat_value"><field name="embed_count"/></span>
|
||||
<span class="o_stat_text">Embed Views</span>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user