mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
@@ -35,6 +35,7 @@
|
||||
"x2many_2d_matrix_field.xml",
|
||||
"web_widget_x2many_2d_matrix/static/src/components/x2many_2d_matrix_field/"
|
||||
"x2many_2d_matrix_field.scss",
|
||||
"web_widget_x2many_2d_matrix/static/src/views/fields/boolean/boolean_field.esm.js",
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -144,6 +144,9 @@ export class X2Many2DMatrixRenderer extends Component {
|
||||
record = this.matrix[y][x].records[0];
|
||||
value = this.matrix[y][x].value;
|
||||
}
|
||||
if (this.list.fields[this.matrixFields.value].type === "boolean") {
|
||||
record.bypass_readonly = true;
|
||||
}
|
||||
value =
|
||||
!this._canAggregate() && record
|
||||
? record.data[this.matrixFields.value]
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import {patch} from "@web/core/utils/patch";
|
||||
import {BooleanField} from "@web/views/fields/boolean/boolean_field";
|
||||
|
||||
patch(BooleanField.prototype, "web_widget_x2many_2d_matrix", {
|
||||
get isReadonly() {
|
||||
if (this.props.record.bypass_readonly) {
|
||||
return false;
|
||||
}
|
||||
return this._super(...arguments);
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user