-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UPD] spreadsheet_oca: Update to 16.0.1.8.0 from OCA/spreadsheet
- Loading branch information
Showing
46 changed files
with
4,696 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
from . import controllers | ||
from . import models | ||
from . import wizards |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# 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 | ||
|
||
|
||
class SpreadsheetDownloadXLSX(Controller): | ||
@route("/spreadsheet/xlsx", type="http", auth="user", methods=["POST"]) | ||
def download_spreadsheet_xlsx(self, zip_name, files, **kw): | ||
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() | ||
return request.make_response( | ||
file_bytes.getvalue(), | ||
[ | ||
("Content-Length", len(file_content)), | ||
("Content-Type", "application/vnd.ms-excel"), | ||
("X-Content-Type-Options", "nosniff"), | ||
("Content-Disposition", content_disposition(zip_name)), | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"version": 12.5, | ||
"sheets": [ | ||
{ | ||
"id": "Sheet1", | ||
"name": "Demo Sheet 1", | ||
"colNumber": 26, | ||
"rowNumber": 100, | ||
"rows": {}, | ||
"cols": {}, | ||
"merges": [], | ||
"cells": { | ||
"A1": {"style": 1, "content": "First Value", "border": 1}, | ||
"A2": {"format": 1, "content": "30.55", "border": 1}, | ||
"B1": {"style": 1, "content": "Second Value", "border": 1}, | ||
"B2": {"format": 1, "content": "50", "border": 1}, | ||
"C1": {"style": 1, "content": "Total", "border": 1}, | ||
"C2": {"format": 1, "content": "=sum(A2:B2)", "border": 1}, | ||
"A3": {"border": 2}, | ||
"B3": {"border": 2}, | ||
"C3": {"border": 2}, | ||
"D1": {"border": 3}, | ||
"D2": {"border": 3} | ||
}, | ||
"conditionalFormats": [], | ||
"figures": [], | ||
"filterTables": [], | ||
"areGridLinesVisible": true, | ||
"isVisible": true | ||
} | ||
], | ||
"entities": {}, | ||
"styles": {"1": {"bold": true, "align": "center"}}, | ||
"formats": {"1": "[$$]#,##0.00"}, | ||
"borders": { | ||
"1": { | ||
"top": ["thin", "#000"], | ||
"bottom": ["thin", "#000"], | ||
"left": ["thin", "#000"], | ||
"right": ["thin", "#000"] | ||
}, | ||
"2": {"top": ["thin", "#000"]}, | ||
"3": {"left": ["thin", "#000"]} | ||
}, | ||
"revisionId": "START_REVISION", | ||
"uniqueFigureIds": true, | ||
"odooVersion": 5, | ||
"globalFilters": [], | ||
"pivots": {}, | ||
"pivotNextId": 1, | ||
"lists": {}, | ||
"listNextId": 1, | ||
"chartOdooMenusReferences": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<odoo> | ||
<record id="demo_spreadsheet" model="spreadsheet.spreadsheet"> | ||
<field name="name">Demo spreadsheet</field> | ||
<field | ||
name="data" | ||
type="base64" | ||
file="spreadsheet_oca/demo/demo_spreadsheet.json" | ||
/> | ||
|
||
</record> | ||
</odoo> |
Oops, something went wrong.