[FIX] purchase: Bad colors in purchase.order tree view

- set correct decoration-info attribute on purchase.order tree view, replacing unexisting states ('wait','confirmed') by existing ones ('draft','sent')
- Move the decoration-info from tree line to name field to comply with the new display standards

closes odoo/odoo#70158

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
This commit is contained in:
Sylvain LE GAL
2021-05-11 09:24:02 +00:00
parent e5658ce529
commit 90ddddbb87
+3 -4
View File
@@ -515,11 +515,11 @@
<field name="priority" eval="1"/>
<field name="arch" type="xml">
<tree string="Purchase Order" decoration-bf="message_unread==True"
decoration-muted="state=='cancel'" decoration-info="state in ('wait','confirmed')" sample="1">
decoration-muted="state=='cancel'" sample="1">
<field name="priority" optional="show" widget="priority" nolabel="1"/>
<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-info="state in ('draft','sent')"/>
<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="partner_id" readonly="1"/>
@@ -580,7 +580,6 @@
<field name="arch" type="xml">
<tree decoration-bf="message_unread==True"
decoration-muted="state=='cancel'"
decoration-info="state in ('wait','confirmed')"
string="Purchase Order"
class="o_purchase_order"
sample="1">
@@ -590,7 +589,7 @@
<field name="priority" optional="show" widget="priority" nolabel="1"/>
<field name="message_unread" invisible="1"/>
<field name="partner_ref" optional="hide"/>
<field name="name" string="Reference" readonly="1" decoration-bf="1"/>
<field name="name" string="Reference" readonly="1" decoration-bf="1" decoration-info="state in ('draft','sent')"/>
<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"/>