[FIX] web: default many2many tags color
When there is no `color` field on the model
e.g. On invoice line taxes
The color class to apply on the badge was set to
`o_tag_color_undefined`
which doesn't exist. It must be set
from `o_tag_color_0` to `o_tag_color_10`
in order have a color.
Because of this, the taxes in the invoices lines
were not visible, because they were written in white
on a white background.
This has been broken by the below revision:
fe66472e2c
removing the or statement (`||`) to set a default
color for models not having a `color` field.
We choose to set `10` as default value, so the color
remains the same compared to the previous release
(light grey). However, if the new behavior chosen
by the usability is to have these in black, it should then
be changed to `0` again.
This commit is contained in:
@@ -749,7 +749,7 @@
|
||||
</t>
|
||||
<t t-name="FieldMany2ManyTag">
|
||||
<t t-foreach="elements" t-as="el">
|
||||
<span t-attf-class="badge dropdown o_tag_color_#{el.color}" t-att-data-color="el.color" t-att-data-index="el_index" t-att-data-id="el.id">
|
||||
<span t-attf-class="badge dropdown o_tag_color_#{el.color || 10}" t-att-data-color="el.color || 10" t-att-data-index="el_index" t-att-data-id="el.id">
|
||||
<span class="o_badge_text" t-attf-title="#{el['display_name']}"><t t-raw="el['display_name']"/></span>
|
||||
<span t-if="!readonly" class="fa fa-times o_delete"/>
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user