Skip to content

Commit

Permalink
[IMP] Many2one value field
Browse files Browse the repository at this point in the history
  • Loading branch information
tarteo committed Jun 7, 2023
1 parent 38576bf commit d32fa9b
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,22 @@ export class X2Many2DMatrixRenderer extends Component {
getValueFieldProps(column, row) {
const x = this.columns.findIndex((c) => c.value === column);
const y = this.rows.findIndex((r) => r.value === row);
const props = this.list.activeFields[this.matrixFields.value].props;
const propsFromAttrs =
this.list.activeFields[this.matrixFields.value].propsFromAttrs;
const record = this.matrix[y][x].records[0];
let value = this.matrix[y][x].value;
if (!this._canAggregate()) {
value = record.data[this.matrixFields.value];
}

return {
value: this.matrix[y][x].value,
...props,
...propsFromAttrs,
value: value,
update: (value) => this.update(x, y, value),
readonly: this.props.readonly,
record: record,
};
}
}
Expand Down

0 comments on commit d32fa9b

Please sign in to comment.