Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ addon | version | maintainers | summary
[web_widget_plotly_chart](web_widget_plotly_chart/) | 17.0.1.0.0 | [![robyf70](https://github.com/robyf70.png?size=30px)](https://github.com/robyf70) | Allow to draw plotly charts.
[web_widget_product_label_section_and_note](web_widget_product_label_section_and_note/) | 17.0.1.0.0 | | unify the product and name into a single column
[web_widget_url_advanced](web_widget_url_advanced/) | 17.0.1.0.0 | | This module extends URL widget for displaying anchors with custom labels.
[web_widget_x2many_2d_matrix](web_widget_x2many_2d_matrix/) | 17.0.1.1.1 | [![JasminSForgeFlow](https://github.com/JasminSForgeFlow.png?size=30px)](https://github.com/JasminSForgeFlow) | Show list fields as a matrix
[web_widget_x2many_2d_matrix](web_widget_x2many_2d_matrix/) | 17.0.1.1.2 | [![JasminSForgeFlow](https://github.com/JasminSForgeFlow.png?size=30px)](https://github.com/JasminSForgeFlow) | Show list fields as a matrix

[//]: # (end addons)

Expand Down
2 changes: 1 addition & 1 deletion web_widget_x2many_2d_matrix/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:ad6c8b54e886ded668c273eb0d4453550b709e574a2c7cd89d9aadd988ad79a9
!! source digest: sha256:d278525cf24b05fd5205403f649914262f35525b6c3244924d74adada150df07
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
Expand Down
2 changes: 1 addition & 1 deletion web_widget_x2many_2d_matrix/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "2D matrix for x2many fields",
"version": "17.0.1.1.1",
"version": "17.0.1.1.2",
"maintainers": ["JasminSForgeFlow"],
"development_status": "Production/Stable",
"author": (
Expand Down
2 changes: 1 addition & 1 deletion web_widget_x2many_2d_matrix/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">2D matrix for x2many fields</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:ad6c8b54e886ded668c273eb0d4453550b709e574a2c7cd89d9aadd988ad79a9
!! source digest: sha256:d278525cf24b05fd5205403f649914262f35525b6c3244924d74adada150df07
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/17.0/web_widget_x2many_2d_matrix"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_widget_x2many_2d_matrix"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module allows to show an x2many field with 3-tuples ($x_value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ export class X2Many2DMatrixRenderer extends Component {
);
}

// More options can be included in the future, here are only added the ones tested initially.
_canOptions() {
return ["many2one"].includes(this.list.fields[this.matrixFields.value].type);
}

getValueFieldProps(column, row) {
const x = this.columns.findIndex((c) => c.value === column);
const y = this.rows.findIndex((r) => r.value === row);
Expand All @@ -163,11 +168,13 @@ export class X2Many2DMatrixRenderer extends Component {
readonly: this.props.readonly,
record: record,
name: this.matrixFields.value,
canCreate: this.props.canCreate,
canOpen: this.props.canOpen,
canWrite: this.props.canWrite,
canQuickCreate: this.props.canQuickCreate,
canCreateEdit: this.props.canCreateEdit,
...(this._canOptions() && {
canCreate: this.props.canCreate,
canOpen: this.props.canOpen,
canWrite: this.props.canWrite,
canQuickCreate: this.props.canQuickCreate,
canCreateEdit: this.props.canCreateEdit,
}),
};
const domain = record.fields[this.matrixFields.value].domain;
if (domain) {
Expand Down
Loading