[FIX] web, *: x2many list horizontal overflow

This issue only occurs on Firefox because ´has´ is not supported
and the following rule is not applied:
https://github.com/odoo/odoo/commit/2cd0106e63785dd34553c2b4747d72b93b9a7afd

Anyway, there is an existing css rule that is applied if the field
class is correclty added.

Steps to reproduce:
- Open Sale
- Add some content in the sale order line

opw-3201461
opw-3285854
opw-3266130
opw-3244581

closes odoo/odoo#121979

X-original-commit: add1df806157c074fd1a3224d1d8bdf1922481fb
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
This commit is contained in:
Adrien Dieudonné
2023-05-23 08:42:12 +02:00
committed by Pierre Paridans
parent a5d2cb5bcb
commit fdf4cbf600
6 changed files with 5 additions and 4 deletions
@@ -71,6 +71,7 @@ export class SectionAndNoteListRenderer extends ListRenderer {
SectionAndNoteListRenderer.template = "account.sectionAndNoteListRenderer";
export class SectionAndNoteFieldOne2Many extends X2ManyField {}
SectionAndNoteFieldOne2Many.additionalClasses = ['o_field_one2many'];
SectionAndNoteFieldOne2Many.components = {
...X2ManyField.components,
ListRenderer: SectionAndNoteListRenderer,
@@ -19,6 +19,7 @@ MrpProductionComponentsX2ManyField.components = {
...X2ManyField.components,
ListRenderer: MrpProductionComponentsListRenderer
};
MrpProductionComponentsX2ManyField.additionalClasses = ["o_field_many2many"];
export const mrpProductionComponentsX2ManyField = {
...x2ManyField,
@@ -13,6 +13,7 @@ SectionOneToManyField.defaultProps = {
...X2ManyField.defaultProps,
editable: "bottom",
};
SectionOneToManyField.additionalClasses = ["o_field_one2many"];
registry.category("fields").add("section_one2many", {
...x2ManyField,
@@ -29,6 +29,7 @@ MovesListRenderer.components = { ...ListRenderer.components, ViewButton: MoveVie
export class StockMoveX2ManyField extends X2ManyField {}
StockMoveX2ManyField.components = { ...X2ManyField.components, ListRenderer: MovesListRenderer };
StockMoveX2ManyField.additionalClasses = ['o_field_one2many'];
export const stockMoveX2ManyField = {
...x2ManyField,
@@ -126,6 +126,7 @@ QuestionPageOneToManyField.defaultProps = {
...X2ManyField.defaultProps,
editable: "bottom",
};
QuestionPageOneToManyField.additionalClasses = ["o_field_one2many"];
export const questionPageOneToManyField = {
...x2ManyField,
@@ -563,10 +563,6 @@
}
}
}
// Prevent table overflow when having long chars in x2many list
.o_field_widget:has(.o_field_x2many.o_field_x2many_list) {
width: 100%;
}
}
}