Skip to content

Commit

Permalink
[FIX] web, *: x2many list horizontal overflow
Browse files Browse the repository at this point in the history
This issue only occurs on Firefox because ´has´ is not supported
and the following rule is not applied:
odoo@2cd0106

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#121979

X-original-commit: add1df8
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
  • Loading branch information
adr-odoo authored and pparidans committed May 23, 2023
1 parent a5d2cb5 commit fdf4cbf
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ MrpProductionComponentsX2ManyField.components = {
...X2ManyField.components,
ListRenderer: MrpProductionComponentsListRenderer
};
MrpProductionComponentsX2ManyField.additionalClasses = ["o_field_many2many"];

export const mrpProductionComponentsX2ManyField = {
...x2ManyField,
Expand Down
1 change: 1 addition & 0 deletions addons/resource/static/src/section_one2many_field.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ SectionOneToManyField.defaultProps = {
...X2ManyField.defaultProps,
editable: "bottom",
};
SectionOneToManyField.additionalClasses = ["o_field_one2many"];

registry.category("fields").add("section_one2many", {
...x2ManyField,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ QuestionPageOneToManyField.defaultProps = {
...X2ManyField.defaultProps,
editable: "bottom",
};
QuestionPageOneToManyField.additionalClasses = ["o_field_one2many"];

export const questionPageOneToManyField = {
...x2ManyField,
Expand Down
4 changes: 0 additions & 4 deletions addons/web/static/src/views/form/form_controller.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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%;
}
}
}

Expand Down

0 comments on commit fdf4cbf

Please sign in to comment.