Skip to content
Closed
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 @@ -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)

Expand Down
8 changes: 6 additions & 2 deletions spreadsheet_oca/README.rst
Original file line number Diff line number Diff line change
@@ -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
===============
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spreadsheet_oca/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 2 additions & 8 deletions spreadsheet_oca/controllers/main.py
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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"),
Expand Down
38 changes: 22 additions & 16 deletions spreadsheet_oca/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>Spreadsheet Oca</title>
<title>README.rst</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -360,16 +360,21 @@
</style>
</head>
<body>
<div class="document" id="spreadsheet-oca">
<h1 class="title">Spreadsheet Oca</h1>
<div class="document">


<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
</a>
<div class="section" id="spreadsheet-oca">
<h1>Spreadsheet Oca</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a7edc105b2730d126fc787ef8ef2c8c1d293b8e18e94402ff7db7d044ee863cd
!! source digest: sha256:6bd5cd4a3aae2f2038384c02a9b974c204abdc75f4aad983e5351ff9cd8af44a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.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/spreadsheet/tree/17.0/spreadsheet_oca"><img alt="OCA/spreadsheet" src="https://img.shields.io/badge/github-OCA%2Fspreadsheet-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/spreadsheet-17-0/spreadsheet-17-0-spreadsheet_oca"><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/spreadsheet&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><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/spreadsheet/tree/17.0/spreadsheet_oca"><img alt="OCA/spreadsheet" src="https://img.shields.io/badge/github-OCA%2Fspreadsheet-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/spreadsheet-17-0/spreadsheet-17-0-spreadsheet_oca"><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/spreadsheet&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 adds a functionality for adding and editing Spreadsheets
using Odoo CE.</p>
<p>It is an alternative to the proprietary module <tt class="docutils literal">spreadsheet_edition</tt>
Expand Down Expand Up @@ -397,9 +402,9 @@ <h1 class="title">Spreadsheet Oca</h1>
</ul>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<h2><a class="toc-backref" href="#toc-entry-1">Usage</a></h2>
<div class="section" id="create-a-new-spreadsheet">
<h2><a class="toc-backref" href="#toc-entry-2"><strong>Create a new spreadsheet</strong></a></h2>
<h3><a class="toc-backref" href="#toc-entry-2"><strong>Create a new spreadsheet</strong></a></h3>
<ul class="simple">
<li>Go to ‘Spreadsheet’ menu</li>
<li>Click on ‘Create’</li>
Expand Down Expand Up @@ -446,7 +451,7 @@ <h2><a class="toc-backref" href="#toc-entry-2"><strong>Create a new spreadsheet<
</ul>
</div>
<div class="section" id="create-a-new-dynamic-spreadsheet-from-pivot">
<h2><a class="toc-backref" href="#toc-entry-3"><strong>Create a new dynamic spreadsheet from pivot</strong></a></h2>
<h3><a class="toc-backref" href="#toc-entry-3"><strong>Create a new dynamic spreadsheet from pivot</strong></a></h3>
<ul class="simple">
<li>Go to any pivot</li>
<li>Press on insert button</li>
Expand Down Expand Up @@ -487,38 +492,38 @@ <h2><a class="toc-backref" href="#toc-entry-3"><strong>Create a new dynamic spre
</div>
</div>
<div class="section" id="development">
<h1><a class="toc-backref" href="#toc-entry-4">Development</a></h1>
<h2><a class="toc-backref" href="#toc-entry-4">Development</a></h2>
<p>If you want to develop custom business functions, you can add others,
based on the file
<a class="reference external" href="https://github.com/odoo/odoo/blob/16.0/addons/spreadsheet_account/static/src/accounting_functions.js">https://github.com/odoo/odoo/blob/16.0/addons/spreadsheet_account/static/src/accounting_functions.js</a></p>
</div>
<div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#toc-entry-5">Known issues / Roadmap</a></h1>
<h2><a class="toc-backref" href="#toc-entry-5">Known issues / Roadmap</a></h2>
<div class="section" id="adding-new-lines-on-pivot-tables">
<h2><a class="toc-backref" href="#toc-entry-6">Adding new lines on pivot tables</a></h2>
<h3><a class="toc-backref" href="#toc-entry-6">Adding new lines on pivot tables</a></h3>
<p>When we add a pivot table, the number of rows is predefined according to
the current data.</p>
<p>In order to add new rows, we need to reinsert the pivot table.</p>
</div>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-7">Bug Tracker</a></h1>
<h2><a class="toc-backref" href="#toc-entry-7">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/spreadsheet/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/spreadsheet/issues/new?body=module:%20spreadsheet_oca%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-8">Credits</a></h1>
<h2><a class="toc-backref" href="#toc-entry-8">Credits</a></h2>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-9">Authors</a></h2>
<h3><a class="toc-backref" href="#toc-entry-9">Authors</a></h3>
<ul class="simple">
<li>CreuBlanca</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-10">Contributors</a></h2>
<h3><a class="toc-backref" href="#toc-entry-10">Contributors</a></h3>
<ul class="simple">
<li>Enric Tobella</li>
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
Expand All @@ -532,7 +537,7 @@ <h2><a class="toc-backref" href="#toc-entry-10">Contributors</a></h2>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-11">Maintainers</a></h2>
<h3><a class="toc-backref" href="#toc-entry-11">Maintainers</a></h3>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
Expand All @@ -545,5 +550,6 @@ <h2><a class="toc-backref" href="#toc-entry-11">Maintainers</a></h2>
</div>
</div>
</div>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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})`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down