[FIX] stock: refresh on state change

Temporary fix to revert once it will be done correctly on
client side. The idea is to remove the variable after a record
editation in order to trigger the recompute of column width

closes odoo/odoo#140663

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
This commit is contained in:
Arnold Moyaux
2023-11-03 16:43:33 +00:00
parent e518dc9fc6
commit 2e254f07c2
@@ -3,10 +3,21 @@
import { registry } from "@web/core/registry";
import { ListRenderer } from "@web/views/list/list_renderer";
import { X2ManyField, x2ManyField } from "@web/views/fields/x2many/x2many_field";
import { useEffect } from "@odoo/owl";
export class MovesListRenderer extends ListRenderer {
static recordRowTemplate = "stock.MovesListRenderer.RecordRow";
setup() {
super.setup();
useEffect(
() => {
this.keepColumnWidths = false;
},
() => [this.state.columns]
);
}
processAllColumn(allColumns, list) {
let cols = super.processAllColumn(...arguments);
if (list.resModel === "stock.move") {