[FIX][IMP] various: correctly place ribbon widget in form views

PURPOSE

Have a nice ribbon widget to display state of records: part II

SPECIFICATIONS

Next to 883c96b781 and recent ribbon widget update some form views
have to be updated. It is best displayed following those rules

  * after oe_button_box in order to fix overlapping;
  * before image to overlap it cleanly;

LINKS

Task ID : 2032621
PR : #34662

Task
This commit is contained in:
Patrick Hoste
2019-08-13 11:29:44 +00:00
committed by Thibault Delavallée
parent c52c8da491
commit 175994cbe2
29 changed files with 31 additions and 32 deletions
+1 -1
View File
@@ -7,8 +7,8 @@
<field name="arch" type="xml">
<form string="Fiscal Position">
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box"/>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<group>
<group>
<field name="active" invisible="1"/>
@@ -143,11 +143,11 @@
<field name="arch" type="xml">
<form string="Analytic Account">
<sheet string="Analytic Account">
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box">
<button class="oe_stat_button" type="action" name="%(account_analytic_line_action)d"
icon="fa-usd" string="Cost/Revenue" widget="statinfo"/>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1>
+1 -1
View File
@@ -196,7 +196,6 @@
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,done"/>
</header>
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box" groups="base.group_user">
<button name="%(event.act_event_registration_from_event)d"
type="action"
@@ -206,6 +205,7 @@
<field name="seats_expected" widget="statinfo" string="Attendees"/>
</button>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1><field name="name" placeholder="Event Name"/></h1>
+1 -1
View File
@@ -10,7 +10,6 @@
<field name="state_id" widget="statusbar" options="{'clickable': '1'}"/>
</header>
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="currency_id" invisible="1"/>
<div class="oe_button_box" name="button_box">
<button name="open_assignation_logs"
@@ -60,6 +59,7 @@
<field name="odometer_count" widget="statinfo" string="Odometer"/>
</button>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="image_128" widget='image' class="oe_avatar"/>
<div class="oe_title">
<label for="model_id" class="oe_edit_only"/>
+1 -1
View File
@@ -38,8 +38,8 @@
<button string="Grant this Badge" type="action" name="%(action_grant_wizard)d" class="oe_highlight" attrs="{'invisible': [('remaining_sending','=',0)]}" />
</header>
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box"/>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="image_1920" widget="image" class="oe_avatar" options="{'preview_image': 'image_128'}"/>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
+1 -1
View File
@@ -30,12 +30,12 @@
<field name="arch" type="xml">
<form string="Employee" create="0" write="0">
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="user_id" invisible="1"/>
<field name="active" invisible="1"/>
<div class="oe_button_box" name="button_box">
<!-- Used by other modules-->
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="image_1920" widget='image' class="oe_avatar" options='{"zoom": true, "preview_image":"image_128"}'/>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
+1 -1
View File
@@ -49,7 +49,6 @@
<button name="%(plan_wizard_action)d" string="Launch Plan" type="action" groups="hr.group_hr_manager"/>
</header>
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div name="button_box" class="oe_button_box">
<button
id="hr_presence_button"
@@ -73,6 +72,7 @@
</div>
</button>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="image_1920" widget='image' class="oe_avatar" options='{"zoom": true, "preview_image":"image_128"}'/>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
@@ -127,8 +127,8 @@
<field name="state" widget="statusbar" options="{'clickable': '1'}"/>
</header>
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box"/>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_title" name="title">
<div class="oe_edit_only">
<div class="float-left">
@@ -21,7 +21,6 @@
<field name="arch" type="xml">
<form string="Time Off Type">
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box">
<button class="oe_stat_button" type="object" name="action_see_days_allocated" icon="fa-archive">
<div class="o_stat_info">
@@ -36,6 +35,7 @@
</div>
</button>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_title">
<h1><field name="name"/></h1>
</div>
@@ -76,7 +76,6 @@
<field name="stage_id" widget="statusbar" options="{'clickable': '1', 'fold_field': 'fold'}" attrs="{'invisible': [('active', '=', False),('emp_id', '=', False)]}"/>
</header>
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box">
<button name="action_applications_email"
class="oe_stat_button"
@@ -102,6 +101,7 @@
options='{"terminology": "archive"}'/>
</button>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="kanban_state" widget="kanban_state_selection"/>
<field name="active" invisible="1"/>
<field name="legend_normal" invisible="1"/>
@@ -333,7 +333,6 @@
<field name="arch" type="xml">
<form string="Equipments">
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box">
<button name="%(hr_equipment_request_action_from_equipment)d"
type="action"
@@ -342,6 +341,7 @@
<field string="Maintenance" name="maintenance_count" widget="statinfo"/>
</button>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1><field name="name" string="Name" placeholder="Equipment Name"/></h1>
@@ -38,13 +38,13 @@
<field name="arch" type="xml">
<form string="Contact List">
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box">
<button name="action_view_contacts"
type="object" icon="fa-user" class="oe_stat_button">
<field name="contact_nbr" string="Recipients" widget="statinfo"/>
</button>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1>
@@ -102,7 +102,6 @@
</strong></p>
</div>
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box">
<button name="action_view_sent"
id="button_view_sent"
@@ -141,7 +140,7 @@
<field name="bounced_ratio" string="Bounced" widget="percentpie"/>
</button>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<group>
<field name="active" invisible="1"/>
<field name="name" required="1" string="Mailing Name"/>
+1 -1
View File
@@ -14,11 +14,11 @@
<field name="arch" type="xml">
<form string="Bill of Material">
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box">
<button name="%(action_report_mrp_bom)d" type="action"
class="oe_stat_button" icon="fa-bars" string="Structure &amp; Cost" attrs="{'invisible': [('bom_line_ids', '=', [])]}"/>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<group>
<group>
<field name="active" invisible="1"/>
+1 -1
View File
@@ -72,7 +72,6 @@
<field name="arch" type="xml">
<form string="Routing">
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box">
<button name="%(action_mrp_routing_time)d" type="action" class="oe_stat_button" icon="fa-clock-o">
<div class="o_field_widget o_stat_info">
@@ -80,6 +79,7 @@
</div>
</button>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_title">
<h1>
<field name="code"/>
+1 -1
View File
@@ -290,7 +290,6 @@
<field name="arch" type="xml">
<form string="Work Center">
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box">
<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">
@@ -317,6 +316,7 @@
</div>
</button>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<group>
<group>
<field name="active" invisible="1"/>
+2 -2
View File
@@ -15,8 +15,8 @@
groups="product.group_product_variant"/>
</header>
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box"/>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name='product_variant_count' invisible='1'/>
<field name='is_product_variant' invisible='1'/>
<field name='attribute_line_ids' invisible='1'/>
@@ -265,8 +265,8 @@
<field name="arch" type="xml">
<form string="Variant Information">
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box"/>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="active" invisible="1"/>
<field name="id" invisible="1"/>
<field name="image_1920" widget="image" class="oe_avatar" options="{'preview_image': 'image_128'}"/>
+2 -2
View File
@@ -93,7 +93,6 @@
<button name="%(portal.portal_share_action)d" string="Share" type="action" class="oe_highlight oe_read_only"/>
</header>
<sheet string="Project">
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box" groups="base.group_user">
<button class="oe_stat_button" name="attachment_tree_view" type="object" icon="fa-file-text-o">
<field string="Documents" name="doc_count" widget="statinfo"/>
@@ -113,6 +112,7 @@
</div>
</button>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_title">
<h1>
<field name="name" placeholder="Project Name"/>
@@ -432,7 +432,6 @@
<field name="stage_id" widget="statusbar" options="{'clickable': '1', 'fold_field': 'fold'}"/>
</header>
<sheet string="Task">
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box">
<button class="oe_stat_button" icon="fa-tasks" type="object" name="action_open_parent_task" string="Parent Task" attrs="{'invisible' : [('parent_id', '=', False)]}" groups="project.group_subtask_project"/>
<button name="action_subtask" type="object" class="oe_stat_button" icon="fa-tasks"
@@ -444,6 +443,7 @@
<field name="rating_count" string="Rating" widget="statinfo"/>
</button>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_title pr-0">
<h1 class="d-flex flex-row justify-content-between">
<field name="priority" widget="priority" class="mr-3"/>
@@ -8,12 +8,12 @@
<field name="arch" type="xml">
<form string="Coupon Program">
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box">
<button class="oe_stat_button" type="object" icon="fa-usd" name="action_view_sales_orders">
<field name="order_count" string="Sales" widget="statinfo"/>
</button>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div name="title" class="oe_left">
<label class="oe_edit_only" for="name" string="Program Name"/>
</div>
+1 -1
View File
@@ -59,8 +59,8 @@
<field name="arch" type="xml">
<form string="Sales Team">
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box"/>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Sales Team"/>
<h1>
+1 -1
View File
@@ -15,7 +15,6 @@
<field name="arch" type="xml">
<form string="Stock Location" create="false">
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box">
<button string="Putaway Rules"
class="oe_stat_button"
@@ -30,6 +29,7 @@
context="{'location_id': active_id}"
/>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
<label for="location_id" class="oe_edit_only"/>
+1 -1
View File
@@ -7,7 +7,6 @@
<field name="arch" type="xml">
<form string="Warehouse" create="false">
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box">
<button name="action_view_all_routes"
string="Routes"
@@ -15,6 +14,7 @@
class="oe_stat_button"
type="object"/>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
<group>
+1 -1
View File
@@ -19,7 +19,6 @@
<field name="state" widget="statusbar"/>
</header>
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box">
<button name="action_survey_user_input"
type="object"
@@ -42,6 +41,7 @@
<field string="Answers" name="answer_done_count" widget="statinfo"/>
</button>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_title" style="width: 100%;">
<label for="title" class="oe_edit_only"/>
<h1><field name="title" placeholder="Survey Title"/></h1>
@@ -59,10 +59,10 @@
<field name="arch" type="xml">
<form string="Blog Post">
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box">
<field name="is_published" widget="website_redirect_button"/>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<group name="blog_details">
<field name="blog_id"/>
<field name="active" invisible="1"/>
@@ -113,11 +113,11 @@
<field name="stage_id" widget="statusbar" options="{'clickable': '1'}"/>
</header>
<sheet string="Track">
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box">
<field name="website_url" invisible="1"/>
<field name="is_published" widget="website_redirect_button"/>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="kanban_state" widget="state_selection"/>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
@@ -12,7 +12,6 @@
<button name="action_channel_invite" string="Invite" type="object" class="oe_highlight" attrs="{'invisible': [('enroll', '!=', 'invite')]}"/>
</header>
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box">
<button name="action_redirect_to_done_members"
type="object"
@@ -41,6 +40,7 @@
</button>
<field name="is_published" widget="website_redirect_button"/>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="image_1920" widget="image" class="oe_avatar" options="{'preview_image': 'image_128'}"/>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Course Title"/>
@@ -40,11 +40,11 @@
<field name="arch" type="xml">
<form string="Lesson">
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box">
<field name="is_published" widget="website_redirect_button"
attrs="{'invisible': [('is_category', '=', True)]}"/>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="image_1920" widget="image" class="oe_avatar" options='{"preview_image": "image_256"}'
attrs="{'readonly': [('slide_type', 'in', ('document', 'presentation', 'video'))], 'invisible': [('is_category', '=', True)]}"
/>
+1 -1
View File
@@ -203,8 +203,8 @@
A partner with the same <span><span class="o_vat_label">Tax ID</span></span> already exists (<field name="same_vat_partner_id"/>), are you sure to create a new one?
</div>
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<div class="oe_button_box" name="button_box"/>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="image_1920" widget='image' class="oe_avatar" options='{"preview_image": "image_128"}'/>
<div class="oe_title">
<field name="is_company" invisible="1"/>
+1 -1
View File
@@ -159,7 +159,6 @@
<header>
</header>
<sheet>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="id" invisible="1"/>
<div class="oe_button_box" name="button_box">
<button name="action_show_groups" type="object" groups="base.group_no_one" class="oe_stat_button" icon="fa-users">
@@ -172,6 +171,7 @@
<field string="Record Rules" name="rules_count" widget="statinfo"/>
</button>
</div>
<widget name="web_ribbon" text="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="active_partner" required="0" readonly="1" invisible="1"/>
<div class="alert alert-info text-center o_form_header"
attrs="{'invisible': [