From 900d1628090bd3041e0205ef7e1b7e2667e220c0 Mon Sep 17 00:00:00 2001 From: Aaron Bohy <aab@odoo.com> Date: Wed, 29 Apr 2020 07:21:49 +0000 Subject: [PATCH] [IMP] *: update list views This commit adapts several views to make them use newly defined widgets, the new decoration-xxx mechanism on fields, and to adapt them to the new design of buttons. Part of task 2195254 --- .../account/views/account_account_views.xml | 2 +- addons/account/views/account_move_views.xml | 17 ++++---- addons/account/wizard/setup_wizards_view.xml | 2 +- addons/event/views/event_views.xml | 6 +-- addons/hr_expense/views/hr_expense_views.xml | 2 +- addons/hr_fleet/views/fleet_vehicle_views.xml | 2 +- .../views/hr_leave_allocation_views.xml | 6 +-- addons/hr_holidays/views/hr_leave_views.xml | 6 +-- .../views/hr_recruitment_views.xml | 2 +- .../hr_timesheet/views/hr_timesheet_views.xml | 2 +- .../link_tracker/views/link_tracker_views.xml | 4 +- addons/lunch/views/lunch_orders_views.xml | 8 +--- addons/mail/views/mail_mail_views.xml | 6 +-- addons/purchase/models/purchase.py | 2 +- addons/purchase/views/purchase_views.xml | 26 ++++++----- addons/sale/views/sale_views.xml | 43 ++++++++++--------- addons/sale_stock/views/sale_order_views.xml | 2 +- addons/stock/views/stock_inventory_views.xml | 2 +- .../stock/views/stock_package_level_views.xml | 2 +- .../website/views/website_visitor_views.xml | 2 +- .../views/link_tracker_views.xml | 2 +- .../website_sale/views/sale_order_views.xml | 4 +- .../views/slide_channel_partner_views.xml | 3 +- odoo/addons/base/views/res_lang_views.xml | 2 +- 24 files changed, 77 insertions(+), 78 deletions(-) diff --git a/addons/account/views/account_account_views.xml b/addons/account/views/account_account_views.xml index 4fe5c202b41b..fd990d234b7b 100644 --- a/addons/account/views/account_account_views.xml +++ b/addons/account/views/account_account_views.xml @@ -63,7 +63,7 @@ <field name="allowed_journal_ids" optional="hide" widget="many2many_tags"/> <field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/> <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/> - <button name="action_read_account" type="object" icon="fa-expand" title="Open" aria-label="Open" class="float-right"/> + <button name="action_read_account" type="object" icon="fa-expand" string="Open" aria-label="Open" class="float-right"/> </tree> </field> </record> diff --git a/addons/account/views/account_move_views.xml b/addons/account/views/account_move_views.xml index 0f1040205950..0e02b040f89f 100644 --- a/addons/account/views/account_move_views.xml +++ b/addons/account/views/account_move_views.xml @@ -397,33 +397,32 @@ <field name="model">account.move</field> <field name="arch" type="xml"> <tree string="Invoices" - decoration-info="state == 'draft'" - decoration-muted="state == 'cancel'" banner_route="/account/account_invoice_onboarding" js_class="account_tree"> - <field name="name"/> + <field name="name" decoration-bf="1"/> <field name="partner_id" invisible="1"/> <field name="invoice_source_email" invisible="1"/> <field name="invoice_partner_display_name" invisible="context.get('default_move_type') not in ('in_invoice', 'in_refund','in_receipt')" groups="base.group_user" string="Vendor" /> <field name="invoice_partner_display_name" invisible="context.get('default_move_type') not in ('out_invoice', 'out_refund','out_receipt')" groups="base.group_user" string="Customer" /> <field name="invoice_date" optional="show" invisible="context.get('default_move_type') not in ('in_invoice', 'in_refund','in_receipt')" string="Bill Date"/> <field name="invoice_date" optional="show" invisible="context.get('default_move_type') not in ('out_invoice', 'out_refund','out_receipt')" string="Invoice Date"/> + <field name="invoice_date_due" widget="remaining_days" optional="show" attrs="{'invisible': [['payment_state', '=', 'paid']]}"/> <field name="invoice_origin" optional="hide" string="Source Document"/> <field name="payment_reference" optional="hide" invisible="context.get('default_move_type') in ('out_invoice', 'out_refund','out_receipt')"/> <field name="ref" optional="hide"/> - <field name="invoice_user_id" optional="hide" invisible="context.get('default_move_type') not in ('out_invoice', 'out_refund','out_receipt')" string="Sales Person"/> + <field name="invoice_user_id" optional="hide" invisible="context.get('default_move_type') not in ('out_invoice', 'out_refund','out_receipt')" string="Sales Person" widget="many2one_avatar_user"/> + <field name="activity_ids" widget="list_activity" optional="show"/> <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}" optional="show"/> - <field name="invoice_date_due" optional="show"/> <field name="amount_untaxed_signed" string="Tax Excluded" sum="Total" optional="show"/> <field name="amount_tax_signed" string="Tax" sum="Total" optional="hide"/> - <field name="amount_total_signed" string="Total" sum="Total" optional="show"/> - <field name="amount_residual_signed" string="Amount Due" sum="Amount Due" optional="show"/> + <field name="amount_total_signed" string="Total" sum="Total" decoration-bf="1" optional="show"/> + <field name="amount_residual_signed" string="Amount Due" sum="Amount Due" optional="hide"/> <field name="currency_id" invisible="1"/> <field name="company_currency_id" invisible="1"/> <field name="state" optional="hide"/> - <field name="payment_state"/> + <field name="payment_state" decoration-success="payment_state == 'paid'" decoration-info="payment_state == 'partial' or payment_state == 'not_paid'" decoration-warning="payment_state == 'in_payment'" widget="badge"/> <field name="move_type" invisible="context.get('default_move_type', True)"/> - </tree> + </tree> </field> </record> diff --git a/addons/account/wizard/setup_wizards_view.xml b/addons/account/wizard/setup_wizards_view.xml index d5158f84df13..169548b2ccb8 100644 --- a/addons/account/wizard/setup_wizards_view.xml +++ b/addons/account/wizard/setup_wizards_view.xml @@ -85,7 +85,7 @@ <field name="tax_ids" optional="hide" widget="many2many_tags"/> <field name="tag_ids" optional="hide" widget="many2many_tags"/> <field name="allowed_journal_ids" optional="hide" widget="many2many_tags"/> - <button name="action_read_account" type="object" icon="fa-expand" title="Open" aria-label="Open" class="float-right"/> + <button name="action_read_account" type="object" icon="fa-expand" string="Open" aria-label="Open" class="float-right"/> </tree> </field> </record> diff --git a/addons/event/views/event_views.xml b/addons/event/views/event_views.xml index 412fd3f35c7d..b316fe15e68a 100644 --- a/addons/event/views/event_views.xml +++ b/addons/event/views/event_views.xml @@ -495,9 +495,9 @@ <field name="state" readonly="0"/> <field name="company_id" groups="base.group_multi_company" optional="hide"/> <field name="message_needaction" invisible="1"/> - <button name="action_confirm" string="Confirm Registration" states="draft" type="object" icon="fa-check text-success"/> - <button name="action_set_done" string="Attended the Event" states="open" type="object" icon="fa-level-down text-success"/> - <button name="action_cancel" string="Cancel Registration" states="draft,open" type="object" icon="fa-times-circle text-danger"/> + <button name="action_confirm" string="Confirm" states="draft" type="object" icon="fa-check"/> + <button name="action_set_done" string="Mark as Attending" states="open" type="object" icon="fa-level-down"/> + <button name="action_cancel" string="Cancel" states="draft,open" type="object" icon="fa-times"/> <field name="activity_exception_decoration" widget="activity_exception"/> </tree> </field> diff --git a/addons/hr_expense/views/hr_expense_views.xml b/addons/hr_expense/views/hr_expense_views.xml index f0461cb3e885..72192d284a09 100644 --- a/addons/hr_expense/views/hr_expense_views.xml +++ b/addons/hr_expense/views/hr_expense_views.xml @@ -55,7 +55,7 @@ <field name="quantity" optional="hide"/> <field name="tax_ids" optional="show" widget="many2many_tags" groups="account.group_account_user"/> <field name="total_amount" optional="show" sum="Total Amount" widget="monetary" options="{'currency_field': 'currency_id'}"/> - <button name="action_get_attachment_view" string="View Attached Documents" type="object" icon="fa-paperclip" attrs="{'invisible': [('attachment_number', '=', 0)]}"/> + <button name="action_get_attachment_view" string="Attachments" type="object" icon="fa-paperclip" attrs="{'invisible': [('attachment_number', '=', 0)]}"/> <field name="message_unread" invisible="1"/> <field name="state" optional="show" readonly="1"/> <field name="company_id" optional="show" groups="base.group_multi_company" readonly="1"/> diff --git a/addons/hr_fleet/views/fleet_vehicle_views.xml b/addons/hr_fleet/views/fleet_vehicle_views.xml index 26c7ef13bc5e..b185e9b8cfbb 100644 --- a/addons/hr_fleet/views/fleet_vehicle_views.xml +++ b/addons/hr_fleet/views/fleet_vehicle_views.xml @@ -7,7 +7,7 @@ <field name="arch" type="xml"> <xpath expr="//field[@name='date_end']" position="after"> <field name="attachment_number" string=" "/> - <button name="action_get_attachment_view" string="View Attachments" type="object" icon="fa-paperclip"/> + <button name="action_get_attachment_view" string="Attachments" type="object" icon="fa-paperclip"/> </xpath> </field> </record> diff --git a/addons/hr_holidays/views/hr_leave_allocation_views.xml b/addons/hr_holidays/views/hr_leave_allocation_views.xml index 265ca7c6fd71..9ee2b0eb6d10 100644 --- a/addons/hr_holidays/views/hr_leave_allocation_views.xml +++ b/addons/hr_holidays/views/hr_leave_allocation_views.xml @@ -198,15 +198,15 @@ <field name="message_needaction" invisible="1"/> <field name="state"/> <button string="Approve" name="action_approve" type="object" - icon="fa-check text-success" + icon="fa-thumbs-up" states="confirm" groups="hr_holidays.group_hr_holidays_responsible"/> <button string="Validate" name="action_validate" type="object" - icon="fa-check text-success" + icon="fa-check" states="validate1" groups="hr_holidays.group_hr_holidays_manager"/> <button string="Refuse" name="action_refuse" type="object" - icon="fa-ban text-danger" + icon="fa-times" states="confirm,validate,validate1" groups="hr_holidays.group_hr_holidays_manager"/> <field name="activity_exception_decoration" widget="activity_exception"/> diff --git a/addons/hr_holidays/views/hr_leave_views.xml b/addons/hr_holidays/views/hr_leave_views.xml index ddac0c7336c9..de0a82bc510d 100644 --- a/addons/hr_holidays/views/hr_leave_views.xml +++ b/addons/hr_holidays/views/hr_leave_views.xml @@ -499,15 +499,15 @@ <field name="user_id" invisible="1"/> <field name="message_needaction" invisible="1"/> <button string="Approve" name="action_approve" type="object" - icon="fa-check text-success" + icon="fa-thumbs-up" states="confirm" groups="hr_holidays.group_hr_holidays_responsible"/> <button string="Validate" name="action_validate" type="object" - icon="fa-check text-success" + icon="fa-check" states="validate1" groups="hr_holidays.group_hr_holidays_manager"/> <button string="Refuse" name="action_refuse" type="object" - icon="fa-ban text-danger" + icon="fa-times" states="confirm,validate,validate1" groups="hr_holidays.group_hr_holidays_manager"/> <field name="activity_exception_decoration" widget="activity_exception"/> diff --git a/addons/hr_recruitment/views/hr_recruitment_views.xml b/addons/hr_recruitment/views/hr_recruitment_views.xml index 238eb494bc7a..4d8c33b43d16 100644 --- a/addons/hr_recruitment/views/hr_recruitment_views.xml +++ b/addons/hr_recruitment/views/hr_recruitment_views.xml @@ -861,7 +861,7 @@ action = act <field name="arch" type="xml"> <tree string="Sources of Applicants" editable="top" class="o_recruitment_list"> <field name="source_id"/> - <button name="create_alias" string="Generate email alias" type="object" icon="fa-repeat text-success" /> + <button name="create_alias" title="Generate email alias" type="object" icon="fa-repeat" /> <field name="email"/> </tree> </field> diff --git a/addons/hr_timesheet/views/hr_timesheet_views.xml b/addons/hr_timesheet/views/hr_timesheet_views.xml index 54aa47f93e5b..df7825a33519 100644 --- a/addons/hr_timesheet/views/hr_timesheet_views.xml +++ b/addons/hr_timesheet/views/hr_timesheet_views.xml @@ -44,7 +44,7 @@ <field name="priority">10</field> <field name="arch" type="xml"> <xpath expr="//field[@name='date']" position="after"> - <field name="employee_id" required="1" options='{"no_open": True}'/> + <field name="employee_id" required="1" widget="many2one_avatar_employee"/> </xpath> </field> </record> diff --git a/addons/link_tracker/views/link_tracker_views.xml b/addons/link_tracker/views/link_tracker_views.xml index c44b287c3739..75336bc79d35 100644 --- a/addons/link_tracker/views/link_tracker_views.xml +++ b/addons/link_tracker/views/link_tracker_views.xml @@ -60,9 +60,9 @@ <field name="create_date"/> <field name="title"/> <field name="url"/> - <field name="short_url"/> + <field name="short_url" optional="hide"/> <field name="count"/> - <button name="action_visit_page" class="btn btn-secondary border ml-5" type="object" string="Visit Page"/> + <button name="action_visit_page" type="object" string="Visit Page" icon="fa-external-link"/> </tree> </field> </record> diff --git a/addons/lunch/views/lunch_orders_views.xml b/addons/lunch/views/lunch_orders_views.xml index cdfcdb3a4647..273ee4502282 100644 --- a/addons/lunch/views/lunch_orders_views.xml +++ b/addons/lunch/views/lunch_orders_views.xml @@ -41,8 +41,8 @@ <field name='price' sum="Total" string="Price" widget="monetary"/> <field name='state'/> <field name="company_id" groups="base.group_multi_company"/> - <button name="action_confirm" string="Confirm" type="object" icon="fa-phone text-success" attrs="{'invisible': [('state', '!=', 'ordered')]}" groups="lunch.group_lunch_manager"/> - <button name="action_cancel" string="Cancel" type="object" icon="fa-times-circle text-danger" attrs="{'invisible': [('state', 'in', ['cancelled', 'confirmed'])]}" groups="lunch.group_lunch_manager"/> + <button name="action_confirm" string="Confirm" type="object" icon="fa-check" attrs="{'invisible': [('state', '!=', 'ordered')]}" groups="lunch.group_lunch_manager"/> + <button name="action_cancel" string="Cancel" type="object" icon="fa-times" attrs="{'invisible': [('state', 'in', ['cancelled', 'confirmed'])]}" groups="lunch.group_lunch_manager"/> </tree> </field> </record> @@ -148,10 +148,6 @@ Nothing to order today </p><p> Here you can see today's orders grouped by vendors. - </p><p> - Click on the <span class="fa fa-phone text-success" role="img" aria-label="Order button" title="Order button"/> to announce that the order is ordered.<br/> - Click on the <span class="fa fa-check text-success" role="img" aria-label="Receive button" title="Receive button"/> to announce that the order is received.<br/> - Click on the <span class="fa fa-times-circle text-danger" role="img" aria-label="Cancel button" title="Cancel button"/> to announce that the order isn't available. </p> </field> </record> diff --git a/addons/mail/views/mail_mail_views.xml b/addons/mail/views/mail_mail_views.xml index 9f3816a35c2f..bc087e39b6d1 100644 --- a/addons/mail/views/mail_mail_views.xml +++ b/addons/mail/views/mail_mail_views.xml @@ -77,9 +77,9 @@ <field name="email_from" invisible="1"/> <field name="state" invisible="1"/> <field name="message_type" invisible="1"/> - <button name="send" string="Send Now" type="object" icon="fa-paper-plane text-success" states='outgoing'/> - <button name="mark_outgoing" string="Retry" type="object" icon="fa-repeat text-success" states='exception,cancel'/> - <button name="cancel" string="Cancel Email" type="object" icon="fa-times-circle text-danger" states='outgoing'/> + <button name="send" string="Send Now" type="object" icon="fa-paper-plane" states='outgoing'/> + <button name="mark_outgoing" string="Retry" type="object" icon="fa-repeat" states='exception,cancel'/> + <button name="cancel" string="Cancel Email" type="object" icon="fa-times-circle" states='outgoing'/> </tree> </field> </record> diff --git a/addons/purchase/models/purchase.py b/addons/purchase/models/purchase.py index 44bc94e8c746..9f66f9cd3f1f 100644 --- a/addons/purchase/models/purchase.py +++ b/addons/purchase/models/purchase.py @@ -78,7 +78,7 @@ class PurchaseOrder(models.Model): "It's used to do the matching when you receive the " "products as this reference is usually written on the " "delivery order sent by your vendor.") - date_order = fields.Datetime('Order By', required=True, states=READONLY_STATES, index=True, copy=False, default=fields.Datetime.now,\ + date_order = fields.Datetime('Order Deadline', required=True, states=READONLY_STATES, index=True, copy=False, default=fields.Datetime.now,\ help="Depicts the date where the Quotation should be validated and converted into a purchase order.") date_approve = fields.Datetime('Confirmation Date', readonly=1, index=True, copy=False) partner_id = fields.Many2one('res.partner', string='Vendor', required=True, states=READONLY_STATES, change_default=True, tracking=True, domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]", help="You can find a vendor by its Name, TIN, Email or Internal Reference.") diff --git a/addons/purchase/views/purchase_views.xml b/addons/purchase/views/purchase_views.xml index 04f80d3a8324..cb38edc705ee 100644 --- a/addons/purchase/views/purchase_views.xml +++ b/addons/purchase/views/purchase_views.xml @@ -518,22 +518,25 @@ <field name="priority" eval="10"/> <field name="arch" type="xml"> <tree string="Purchase Order" multi_edit="1" decoration-bf="message_unread==True" - decoration-muted="state=='cancel'" decoration-info="state in ('wait','confirmed')" class="o_purchase_order" js_class="purchase_list_dashboard"> + class="o_purchase_order" js_class="purchase_list_dashboard"> <field name="message_unread" invisible="1"/> <field name="partner_ref" optional="hide"/> - <field name="name" string="Reference" readonly="1"/> - <field name="date_order" invisible="not context.get('quotation_only', False)" optional="show"/> + <field name="name" string="Reference" readonly="1" decoration-bf="1"/> + <field name="date_order" attrs="{'invisible': ['|', '|', ('state', '=', 'purchase'), ('state', '=', 'done'), ('state', '=', 'cancel')]}" + invisible="not context.get('quotation_only', False)" widget="remaining_days" optional="show"/> <field name="date_approve" invisible="context.get('quotation_only', False)" optional="show"/> <field name="partner_id" readonly="1"/> <field name="company_id" readonly="1" options="{'no_create': True}" groups="base.group_multi_company" optional="show"/> <field name="date_planned" invisible="context.get('quotation_only', False)" optional="show"/> - <field name="user_id" optional="show"/> + <field name="user_id" optional="show" widget="many2one_avatar_user"/> + <field name="activity_ids" widget="list_activity" optional="show"/> <field name="origin" optional="show"/> <field name="amount_untaxed" sum="Total Untaxed amount" string="Untaxed" widget="monetary" optional="hide"/> - <field name="amount_total" sum="Total amount" widget="monetary" optional="show"/> + <field name="amount_total" sum="Total amount" widget="monetary" optional="show" decoration-bf="1"/> <field name="currency_id" invisible="1"/> - <field name="state" optional="show"/> + <field name="state" optional="show" widget="badge" decoration-success="state == 'purchase' or state == 'done'" + decoration-warning="state == 'to approve'" decoration-info="state == 'draft' or state == 'sent'"/> <field name="invoice_status" optional="hide"/> <field name="activity_exception_decoration" widget="activity_exception"/> </tree> @@ -547,19 +550,20 @@ <tree decoration-bf="message_unread==True" decoration-muted="state=='cancel'" decoration-info="state in ('wait','confirmed')" string="Purchase Order" class="o_purchase_order"> <field name="message_unread" invisible="1"/> <field name="partner_ref" optional="hide"/> - <field name="name" string="Reference" readonly="1"/> + <field name="name" string="Reference" readonly="1" decoration-bf="1"/> <field name="date_order" invisible="not context.get('quotation_only', False)" optional="show"/> - <field name="date_approve" invisible="context.get('quotation_only', False)" optional="show"/> + <field name="date_approve" widget="date" invisible="context.get('quotation_only', False)" optional="show"/> <field name="partner_id"/> <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}" optional="show"/> <field name="date_planned" invisible="context.get('quotation_only', False)" optional="show"/> - <field name="user_id" optional="show"/> + <field name="user_id" widget="many2one_avatar_user" optional="show"/> + <field name="activity_ids" widget="list_activity" optional="show"/> <field name="origin" optional="show"/> <field name="amount_untaxed" sum="Total Untaxed amount" string="Untaxed" widget="monetary" optional="hide"/> - <field name="amount_total" sum="Total amount" widget="monetary" optional="show"/> + <field name="amount_total" sum="Total amount" widget="monetary" optional="show" decoration-bf="1"/> <field name="currency_id" invisible="1"/> <field name="state" invisible="1"/> - <field name="invoice_status" optional="show"/> + <field name="invoice_status" widget="badge" decoration-success="invoice_status == 'invoiced'" decoration-info="invoice_status == 'to invoice'" optional="show"/> </tree> </field> </record> diff --git a/addons/sale/views/sale_views.xml b/addons/sale/views/sale_views.xml index 23bb0736a389..be49874e70bf 100644 --- a/addons/sale/views/sale_views.xml +++ b/addons/sale/views/sale_views.xml @@ -195,21 +195,22 @@ <field name="model">sale.order</field> <field name="priority">2</field> <field name="arch" type="xml"> - <tree string="Sales Orders" decoration-bf="message_needaction==True" decoration-muted="state=='cancel'" multi_edit="1"> + <tree string="Sales Orders" decoration-bf="message_needaction==True" multi_edit="1"> <field name="message_needaction" invisible="1"/> - <field name="name" string="Order Number" readonly="1"/> - <field name="date_order" string="Order Date"/> - <field name="commitment_date"/> - <field name="expected_date"/> + <field name="name" string="Number" readonly="1" decoration-bf="1"/> + <field name="date_order" string="Order Date" widget="date" optional="show"/> + <field name="commitment_date" optional="hide"/> + <field name="expected_date" optional="hide"/> <field name="partner_id" readonly="1"/> - <field name="user_id" optional="show"/> + <field name="user_id" optional="show" widget="many2one_avatar_user"/> + <field name="activity_ids" widget="list_activity" optional="show"/> <field name="team_id" optional="hide"/> <field name="company_id" groups="base.group_multi_company" optional="show" readonly="1"/> <field name="amount_untaxed" sum="Total Tax Excluded" widget="monetary" optional="hide"/> <field name="amount_tax" sum="Tax Total" widget="monetary" optional="hide"/> - <field name="amount_total" sum="Total Tax Included" widget="monetary" optional="show"/> + <field name="amount_total" sum="Total Tax Included" widget="monetary" decoration-bf="1" optional="show"/> <field name="currency_id" invisible="1"/> - <field name="invoice_status" optional="show"/> + <field name="invoice_status" decoration-success="invoice_status == 'invoiced'" decoration-info="invoice_status == 'to invoice'" decoration-warning="invoice_status == 'upselling'" widget="badge" optional="show"/> <field name="tag_ids" optional="hide" widget="many2many_tags" options="{'color_field': 'color'}"/> <field name="state" invisible="1"/> <field name="activity_exception_decoration" widget="activity_exception"/> @@ -222,24 +223,24 @@ <field name="model">sale.order</field> <field name="priority">4</field> <field name="arch" type="xml"> - <tree string="Quotation" class="o_sale_order" decoration-bf="message_needaction==True" decoration-muted="state=='cancel'" multi_edit="1"> - <field name="message_needaction" invisible="1"/> - <field name="name" string="Quotation Number" readonly="1"/> - <field name="create_date" string="Create Date"/> - <field name="commitment_date"/> - <field name="expected_date"/> - <field name="partner_id" readonly="1" /> - <field name="user_id" optional="show"/> + <tree string="Quotation" class="o_sale_order" decoration-bf="message_needaction==True" multi_edit="1"> + <field name="name" string="Number" readonly="1" decoration-bf="1"/> + <field name="create_date" string="Creation Date" widget="date" optional="show"/> + <field name="commitment_date" widget="date" optional="hide"/> + <field name="expected_date" widget="date" optional="hide"/> + <field name="partner_id" readonly="1"/> + <field name="user_id" widget="many2one_avatar_user" optional="show"/> + <field name="activity_ids" widget="list_activity" optional="show"/> <field name="team_id" optional="hide"/> + <field name="tag_ids" optional="hide" widget="many2many_tags" options="{'color_field': 'color'}"/> <field name="company_id" groups="base.group_multi_company" optional="show" readonly="1"/> <field name="amount_untaxed" sum="Total Tax Excluded" widget="monetary" optional="hide"/> <field name="amount_tax" sum="Tax Total" widget="monetary" optional="hide"/> - <field name="amount_total" sum="Total Tax Included" widget="monetary" optional="show"/> - <field name="currency_id" invisible="1"/> - <field name="state" optional="show"/> + <field name="amount_total" sum="Total Tax Included" widget="monetary" decoration-bf="1" optional="show"/> + <field name="state" decoration-success="state == 'sale' or state == 'done'" decoration-info="state == 'draft' or state == 'sent'" widget="badge" optional="show"/> <field name="invoice_status" optional="hide"/> - <field name="tag_ids" optional="hide" widget="many2many_tags" options="{'color_field': 'color'}"/> - <field name="activity_exception_decoration" widget="activity_exception"/> + <field name="message_needaction" invisible="1"/> + <field name="currency_id" invisible="1"/> </tree> </field> </record> diff --git a/addons/sale_stock/views/sale_order_views.xml b/addons/sale_stock/views/sale_order_views.xml index ef9b076fabd3..50dcdcfe9f9e 100644 --- a/addons/sale_stock/views/sale_order_views.xml +++ b/addons/sale_stock/views/sale_order_views.xml @@ -56,7 +56,7 @@ <field name="model">sale.order</field> <field name="inherit_id" ref="sale.view_quotation_tree"/> <field name="arch" type="xml"> - <xpath expr="//field[@name='team_id']" position="after"> + <xpath expr="//field[@name='tag_ids']" position="after"> <field name="warehouse_id" options="{'no_create': True}" groups="stock.group_stock_multi_warehouses" optional="hide" /> </xpath> </field> diff --git a/addons/stock/views/stock_inventory_views.xml b/addons/stock/views/stock_inventory_views.xml index b7b527c063e0..76c5853e0915 100644 --- a/addons/stock/views/stock_inventory_views.xml +++ b/addons/stock/views/stock_inventory_views.xml @@ -43,7 +43,7 @@ ('state', '!=', 'confirm')]}"/> <field name="theoretical_qty" string="On Hand" width="0.5" force_save="1" readonly="1" optional="show"/> - <button name="action_refresh_quantity" string="Refresh quantity" title="Refresh quantity" + <button name="action_refresh_quantity" title="Refresh quantity" icon="fa-refresh" type="object" attrs="{'invisible': [('outdated', '=', False)]}"/> <field name="product_qty" width="0.5" string="Counted"/> diff --git a/addons/stock/views/stock_package_level_views.xml b/addons/stock/views/stock_package_level_views.xml index 65bab95685b6..94358de66473 100644 --- a/addons/stock/views/stock_package_level_views.xml +++ b/addons/stock/views/stock_package_level_views.xml @@ -59,7 +59,7 @@ <field name="location_dest_id" options="{'no_create': True}" attrs="{'column_invisible': [('parent.picking_type_code', '=', 'outgoing')]}" groups="stock.group_stock_multi_locations"/> <field name="state"/> <field name="is_done" attrs="{'readonly': ['|', ('parent.state', 'in', ('draft', 'new', 'done')), ('is_fresh_package', '=', True)]}"/> - <button name="action_show_package_details" string="Display package content" type="object" icon="fa-list" /> + <button name="action_show_package_details" title="Display package content" type="object" icon="fa-list" /> </tree> </field> </record> diff --git a/addons/website/views/website_visitor_views.xml b/addons/website/views/website_visitor_views.xml index d28ca503ddc9..4d15572b57b2 100644 --- a/addons/website/views/website_visitor_views.xml +++ b/addons/website/views/website_visitor_views.xml @@ -237,7 +237,7 @@ <field name="is_connected" invisible="1"/> <field name="email" invisible="1"/> <button string="Send Email" name="action_send_mail" type="object" - icon="fa-envelope" attrs="{'invisible': [('email', '=', False)]}"/> + icon="fa-comment" attrs="{'invisible': [('email', '=', False)]}"/> </tree> </field> </record> diff --git a/addons/website_links/views/link_tracker_views.xml b/addons/website_links/views/link_tracker_views.xml index d0a1de5881bc..9649f474dc38 100644 --- a/addons/website_links/views/link_tracker_views.xml +++ b/addons/website_links/views/link_tracker_views.xml @@ -6,7 +6,7 @@ <field name="inherit_id" ref="link_tracker.link_tracker_view_tree"/> <field name="arch" type="xml"> <xpath expr="//button[@name='action_visit_page']" position="after"> - <button name="action_visit_page_statistics" class="btn btn-secondary border" type="object" string="Statistics"/> + <button name="action_visit_page_statistics" type="object" string="Statistics" icon="fa-bar-chart"/> </xpath> </field> </record> diff --git a/addons/website_sale/views/sale_order_views.xml b/addons/website_sale/views/sale_order_views.xml index 1d81ab89c091..c252b796e323 100644 --- a/addons/website_sale/views/sale_order_views.xml +++ b/addons/website_sale/views/sale_order_views.xml @@ -289,7 +289,7 @@ <field name="inherit_id" ref="sale.view_quotation_tree"/> <field name="arch" type="xml"> <xpath expr="//field[@name='user_id']" position="before"> - <field name="website_id" optional="show"/> + <field name="website_id" optional="hide"/> </xpath> </field> </record> @@ -299,7 +299,7 @@ <field name="model">sale.order</field> <field name="inherit_id" ref="sale.view_order_tree"/> <field name="arch" type="xml"> - <xpath expr="//field[@name='user_id']" position="before"> + <xpath expr="//field[@name='partner_id']" position="before"> <field name="website_id" optional="show"/> </xpath> </field> diff --git a/addons/website_slides/views/slide_channel_partner_views.xml b/addons/website_slides/views/slide_channel_partner_views.xml index fb4133e5b85d..20227f7c5d32 100644 --- a/addons/website_slides/views/slide_channel_partner_views.xml +++ b/addons/website_slides/views/slide_channel_partner_views.xml @@ -30,8 +30,7 @@ <field name="partner_email"/> <field name="channel_id" string="Channel" invisible="context.get('default_channel_id',False)" /> <field name="completion" string="Progress" widget="progressbar" /> - <button name="unlink" class="text-danger ml-5" string="Remove" - icon="fa-times-circle" type="object"/> + <button name="unlink" title="Remove" icon="fa-times" type="object"/> </tree> </field> </record> diff --git a/odoo/addons/base/views/res_lang_views.xml b/odoo/addons/base/views/res_lang_views.xml index e18bd7ac52fc..6a1d4232b375 100644 --- a/odoo/addons/base/views/res_lang_views.xml +++ b/odoo/addons/base/views/res_lang_views.xml @@ -13,7 +13,7 @@ <field name="direction" groups="base.group_no_one"/> <field name="active"/> <button name="%(base.action_view_base_language_install)d" - string="Activate Language and Update Translations" + string="Activate / Update" type="action" icon="fa-refresh"/> </tree> -- GitLab