diff --git a/README.md b/README.md index 0ddf493b..15169b00 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Available addons addon | version | maintainers | summary --- | --- | --- | --- [spreadsheet_dashboard_oca](spreadsheet_dashboard_oca/) | 17.0.1.0.0 | | Use OCA Spreadsheets on dashboards configuration -[spreadsheet_oca](spreadsheet_oca/) | 17.0.1.0.0 | | Allow to edit spreadsheets +[spreadsheet_oca](spreadsheet_oca/) | 17.0.1.0.4 | | Allow to edit spreadsheets [//]: # (end addons) diff --git a/spreadsheet_oca/README.rst b/spreadsheet_oca/README.rst index 23afef23..3c95c9f2 100644 --- a/spreadsheet_oca/README.rst +++ b/spreadsheet_oca/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + =============== Spreadsheet Oca =============== @@ -7,13 +11,13 @@ Spreadsheet Oca !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:a7edc105b2730d126fc787ef8ef2c8c1d293b8e18e94402ff7db7d044ee863cd + !! source digest: sha256:6bd5cd4a3aae2f2038384c02a9b974c204abdc75f4aad983e5351ff9cd8af44a !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status :alt: Beta -.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png +.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fspreadsheet-lightgray.png?logo=github diff --git a/spreadsheet_oca/__manifest__.py b/spreadsheet_oca/__manifest__.py index e2e3e751..d5dcd9ea 100644 --- a/spreadsheet_oca/__manifest__.py +++ b/spreadsheet_oca/__manifest__.py @@ -5,7 +5,7 @@ "name": "Spreadsheet Oca", "summary": """ Allow to edit spreadsheets""", - "version": "17.0.1.0.0", + "version": "17.0.1.0.4", "license": "AGPL-3", "author": "CreuBlanca,Odoo Community Association (OCA)", "website": "https://github.com/OCA/spreadsheet", diff --git a/spreadsheet_oca/controllers/main.py b/spreadsheet_oca/controllers/main.py index ef77af1d..dcc35bc7 100644 --- a/spreadsheet_oca/controllers/main.py +++ b/spreadsheet_oca/controllers/main.py @@ -1,8 +1,6 @@ # Copyright 2024 Tecnativa - Carlos Roca # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). import json -from io import BytesIO -from zipfile import ZipFile from odoo.http import Controller, content_disposition, request, route @@ -13,13 +11,9 @@ def download_spreadsheet_xlsx(self, zip_name, files, **kw): if hasattr(files, "read"): files = files.read().decode("utf-8") files = json.loads(files) - file_bytes = BytesIO() - with ZipFile(file_bytes, "w") as zip_file: - for file in files: - zip_file.writestr(file["path"], file["content"]) - file_content = file_bytes.getvalue() + file_content = request.env["spreadsheet.mixin"]._zip_xslx_files(files) return request.make_response( - file_bytes.getvalue(), + file_content, [ ("Content-Length", len(file_content)), ("Content-Type", "application/vnd.ms-excel"), diff --git a/spreadsheet_oca/static/description/index.html b/spreadsheet_oca/static/description/index.html index 1d426e7d..522bd8f0 100644 --- a/spreadsheet_oca/static/description/index.html +++ b/spreadsheet_oca/static/description/index.html @@ -3,7 +3,7 @@ -Spreadsheet Oca +README.rst -
-

Spreadsheet Oca

+
+ + +Odoo Community Association + +
+

Spreadsheet Oca

-

Beta License: AGPL-3 OCA/spreadsheet Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/spreadsheet Translate me on Weblate Try me on Runboat

This module adds a functionality for adding and editing Spreadsheets using Odoo CE.

It is an alternative to the proprietary module spreadsheet_edition @@ -397,9 +402,9 @@

Spreadsheet Oca

-

Usage

+

Usage

-

Create a new spreadsheet

+

Create a new spreadsheet

-

Development

+

Development

If you want to develop custom business functions, you can add others, based on the file https://github.com/odoo/odoo/blob/16.0/addons/spreadsheet_account/static/src/accounting_functions.js

-

Known issues / Roadmap

+

Known issues / Roadmap

-

Adding new lines on pivot tables

+

Adding new lines on pivot tables

When we add a pivot table, the number of rows is predefined according to the current data.

In order to add new rows, we need to reinsert the pivot table.

-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -510,15 +515,15 @@

Bug Tracker

Do not contact contributors directly about support or help with technical issues.

-

Credits

+

Credits

-

Authors

+

Authors

  • CreuBlanca
-

Contributors

+

Contributors

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -545,5 +550,6 @@

Maintainers

+
diff --git a/spreadsheet_oca/static/src/spreadsheet/bundle/filter.esm.js b/spreadsheet_oca/static/src/spreadsheet/bundle/filter.esm.js index a6d1723b..99f9677d 100644 --- a/spreadsheet_oca/static/src/spreadsheet/bundle/filter.esm.js +++ b/spreadsheet_oca/static/src/spreadsheet/bundle/filter.esm.js @@ -181,6 +181,7 @@ export class EditFilterPanel extends Component { } onFieldMatchUpdate(object, name) { this.state.objects[object.id].fieldMatch.chain = name; + this.state.objects[object.id].fieldMatch.type = object.fields[name]?.type; } toggleDateDefaultValue(ev) { this.state.defaultValue = ev.target.checked ? "this_month" : undefined; diff --git a/spreadsheet_oca/static/src/spreadsheet/bundle/filter_panel_datasources.esm.js b/spreadsheet_oca/static/src/spreadsheet/bundle/filter_panel_datasources.esm.js index 2d9bd56c..5e764e1a 100644 --- a/spreadsheet_oca/static/src/spreadsheet/bundle/filter_panel_datasources.esm.js +++ b/spreadsheet_oca/static/src/spreadsheet/bundle/filter_panel_datasources.esm.js @@ -81,8 +81,7 @@ export class PivotPanelDisplay extends Component { const sortedColumn = this.props.pivotDefinition.sortedColumn; const orderTranslate = sortedColumn.order === "asc" ? _t("ascending") : _t("descending"); - const GroupByDisplayLabel = this.PivotDataSource.getGroupByDisplayLabel( - "measure", + const GroupByDisplayLabel = this.PivotDataSource.getMeasureDisplayName( sortedColumn.measure ); return `${GroupByDisplayLabel} (${orderTranslate})`; diff --git a/spreadsheet_oca/static/src/spreadsheet/bundle/spreadsheet_action.esm.js b/spreadsheet_oca/static/src/spreadsheet/bundle/spreadsheet_action.esm.js index b91f92d1..8e7a263c 100644 --- a/spreadsheet_oca/static/src/spreadsheet/bundle/spreadsheet_action.esm.js +++ b/spreadsheet_oca/static/src/spreadsheet/bundle/spreadsheet_action.esm.js @@ -147,9 +147,9 @@ export class ActionSpreadsheetOca extends Component { while (row >= 0) { for (var col = maxcols; col >= 0; col--) { if ( - spreadsheet_model.getters.getCell(sheetId, col, row) !== + spreadsheet_model.getters.getCell({ sheetId, col, row }) !== undefined && - !spreadsheet_model.getters.getCell(sheetId, col, row).isEmpty() + spreadsheet_model.getters.getCell({ sheetId, col, row }).content ) { filled = true; break;