[FIX] web: hide list readonly checkbox when entering edition

Forward-port of https://github.com/odoo/enterprise/commit/8a55b3f9f7a7524583effb8198c03ebf695131bd

There are multiple problems with the editable view list. It should be
solved once and for all in the work-in-progress master.

This commit fixes a bug with readonly checkboxes. When a field is
readonly, the table cell gets the "o_readonly" class which changes
its style and behavior. When entering edition, the cells are hidden
except the ones with this "o_readonly" class so that their style are
not affected. The "o_readonly" cell content however was hidden thanks
to a "color: transparent;" rule to let the form readonly field show
the value. The problem is that checkboxes... are not hidden with this
"color: transparent;" rule. Also, the "o_readonly" class is not toggled
during edition while the readonly status could be... so the right fix
would be to get rid of this "o_readonly" class and let the inline form
handle the behavior, but this would affect style and possibly break
unknown behavior.

This fix adds rules to handle the checkbox case correctly.
This commit is contained in:
qsm-odoo
2017-02-10 11:49:05 +01:00
parent 06e9e45d03
commit b5971e417f
+5 -1
View File
@@ -135,6 +135,10 @@
&.o_readonly {
visibility: visible;
color: transparent;
> .o_checkbox {
visibility: hidden;
}
}
}
}
@@ -155,7 +159,7 @@
max-width: 100%; // Fix a chrome bug where badge would not break on multiple lines
}
&.o_readonly {
&.o_readonly:not(.o_checkbox) {
background-color: transparent;
padding: 5px;
}