[FIX] web: no red underline on invalid field with no label

Since the "always edit" task in form view, the underline (border-bottom)
only appears when input is `:focus` or `:hover`.
The problem occurs because the rule for `.o_field_invalid` doesn't match,
so the transparent color is applied and the red underline only appears
when we are hover or when the field has the focus.

This commit fixes the problem by setting the border transparent only
when the field is not invalid, not hover and not focus and not in a form
`.o_field_highlight`.

So now, we better see the invalid fields without hovering it.

Steps to reproduce:
* Open Project
* Select a project
* Select a task
* Create a new task
* Try to save manually the task => BUG a notification appears but the
  "task title" (name field) is not underline

Task ID: 3069662

closes odoo/odoo#106123

X-original-commit: 1666ee5515996fab8a843b36b4fd93b776172f75
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
This commit is contained in:
Romeo Fragomeli
2022-11-21 11:50:21 +01:00
parent 1c201bb8ae
commit 0cb185a126
@@ -205,16 +205,11 @@
// rules for fields borders: only on hover/focus by default
// except when used with o_field_highlight (on parent or on the field)
.o_input {
border-color: transparent;
padding: $o-input-padding-y $o-input-padding-x;
&:hover, &:focus {
border-color: var(--o-input-border-color);
}
}
&.o_field_invalid .o_input {
border-color: var(--o-input-border-color);
&:not(.o_field_highlight) .o_field_widget:not(.o_field_invalid) .o_input:not(:hover):not(:focus) {
--o-input-border-color: transparent;
}
.o_datepicker {