-
-
Notifications
You must be signed in to change notification settings - Fork 102
[17.0][MIG] spreadsheet_oca #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
128 commits
Select commit
Hold shift + click to select a range
35ccfbc
[ADD] spreadsheet_oca
etobella eab15d2
[UPD] Update spreadsheet_oca.pot
c50b879
[UPD] README.rst
OCA-git-bot 4bac6e9
[FIX] spreadsheet_oca: Improve security
etobella 165770d
[UPD] Update spreadsheet_oca.pot
ffa4a18
spreadsheet_oca 16.0.1.0.1
OCA-git-bot 1b38858
[IMP] spreadsheet_oca: Allow to import to existent spreadsheets
etobella 398ae32
[IMP] spreadsheet_oca: Allow to export graphs to spreadsheets
etobella b211f60
[IMP] spreadsheet_oca: add to current sheet
etobella b0ee374
[UPD] Update spreadsheet_oca.pot
dff56d0
spreadsheet_oca 16.0.1.1.0
OCA-git-bot 631b4b3
[FIX] spreadsheet_oca: Ctrl+Z was not working properly
etobella 8d6fc1c
[IMP] spreadhseet_oca: Allow edition of sheet name
etobella b224cc6
[IMP] spreadsheet_oca: Allow to edit filters
etobella 69dd677
[UPD] Update spreadsheet_oca.pot
d477679
spreadsheet_oca 16.0.1.1.1
OCA-git-bot 9a30157
[UPD] Update spreadsheet_oca.pot
b3f51dc
[FIX] spreadsheet_oca: Filters where failing
etobella 2e79c1a
[IMP] spreadsheet_oca: Alloe to edit Pivot data
etobella f3500ee
[IMP] spreadsheet_oca: Allow to import lists
etobella d0b5165
[IMP] spreadsheet_oca: Allow to edit lists
etobella 62d545d
[IMP] spreadsheet_oca: Allow to reinsert a pivot table
etobella 169cd5a
[FIX] spreadsheet_oca: Fix filters
etobella aa20058
[UPD] Update spreadsheet_oca.pot
05efacf
spreadsheet_oca 16.0.1.1.2
OCA-git-bot 5c5df99
[IMP] spreadsheet_oca: Allow to edit Odoo graphs properly
etobella 6ac4d05
[UPD] Update spreadsheet_oca.pot
c28ad8b
spreadsheet_oca 16.0.1.1.3
OCA-git-bot cf343b8
[UPD] Update spreadsheet_oca.pot
3805eca
[IMP] spreadsheet_oca: Add roadmap for specific questions
etobella da85a6c
[IMP] spreadsheet_oca: Allow to set the menu in all kind of charts. I…
etobella f98bd5e
[UPD] Update spreadsheet_oca.pot
a8a8590
[UPD] README.rst
OCA-git-bot 830a729
spreadsheet_oca 16.0.1.2.0
OCA-git-bot 04931e1
[UPD] README.rst
OCA-git-bot 8ba1e4c
Added translation using Weblate (Dutch)
Jan-Onestein f4ff46a
Translated using Weblate (Dutch)
Jan-Onestein 3a7c51f
Update translation files
weblate ce1b7e4
Added translation using Weblate (Italian)
mymage 48dbe28
Translated using Weblate (Italian)
mymage 1bf1d26
[UPD] Update spreadsheet_oca.pot
e5f6531
Update translation files
weblate c864cee
Translated using Weblate (Italian)
mymage 3ad3f92
[FIX] spreadsheet_oca: Cannot open spreadsheet when using undo / redo
royle-vietnam d771622
[IMP] spreadsheet_oca : Improve documentation
legalsylvain 7b548a8
[UPD] Update spreadsheet_oca.pot
52dc0e8
[BOT] post-merge updates
OCA-git-bot 2365634
Added translation using Weblate (French (France) (fr_FR))
legalsylvain de5f51d
Update translation files
weblate 75fb651
[UPD] Update spreadsheet_oca.pot
e12f187
Update translation files
weblate e619b6a
Translated using Weblate (Italian)
rbellanova 6c89eff
[UPD] Update spreadsheet_oca.pot
950b874
Update translation files
weblate 3055af8
[UPD] Update spreadsheet_oca.pot
a0d951f
Update translation files
weblate 5166552
[FIX] spreadsheet_oca: error when adding relation filter
daiduongnguyen-odoo 8aaf5d1
[BOT] post-merge updates
OCA-git-bot 521662a
[UPD] Update spreadsheet_oca.pot
02bab61
[BOT] post-merge updates
OCA-git-bot 3893d73
Update translation files
weblate 739f8cf
[UPD] Update spreadsheet_oca.pot
d4f4460
Update translation files
weblate 0305aa8
[UPD] Update spreadsheet_oca.pot
f88b9de
Update translation files
weblate a3a698a
[UPD] Update spreadsheet_oca.pot
0446bf7
Update translation files
weblate f74c7e7
[FIX] spreadsheet_oca: Error when deleting a worksheet
chrisandrewmann d4ee718
[BOT] post-merge updates
OCA-git-bot 733549d
[FIX] spreadsheet_oca: Pivot does not imported correctly
CarlosRoca13 ce5d39a
[IMP] spreadsheet_oca: Auto resize cols to adjust them to cotent
CarlosRoca13 9132367
[UPD] Update spreadsheet_oca.pot
e42526f
[BOT] post-merge updates
OCA-git-bot 336dd11
Update translation files
weblate 6ac6c8e
Translated using Weblate (Italian)
mymage 35817cf
[UPD] Update spreadsheet_oca.pot
c611470
Update translation files
weblate 85fbdd2
[UPD] Update spreadsheet_oca.pot
3450460
Update translation files
weblate 4e84433
[FIX] spreadsheet_oca: Keep pivot order
CarlosRoca13 98537fa
[UPD] Update spreadsheet_oca.pot
ff8dc25
[BOT] post-merge updates
OCA-git-bot b19a24a
Update translation files
weblate e83498a
[IMP] spreadsheet*_oca: Add field to define name of table and restruc…
CarlosRoca13 d7bfa52
[IMP] spreadsheet_oca: Allow generate dynamic tables
CarlosRoca13 1a1aac4
[IMP] spreadsheet_oca: Allow download spreadsheet as XLSX
CarlosRoca13 1155239
[FIX] spreadsheet_oca: Make last changes compatibles with tree and graph
CarlosRoca13 9fc26b5
[UPD] Update spreadsheet_oca.pot
50c5dce
[BOT] post-merge updates
OCA-git-bot 4cf172f
Update translation files
weblate 285d713
Translated using Weblate (Italian)
mymage 9f2da37
Added translation using Weblate (Portuguese)
peterromao 3390abc
Translated using Weblate (Portuguese)
peterromao cc61d70
[FIX] spreadsheet_oca: correct spelling errors and remove outdated
royle-vietnam f5c343a
[UPD] Update spreadsheet_oca.pot
cf13a08
[BOT] post-merge updates
OCA-git-bot 07b88e1
Update translation files
weblate 20aa5f1
[IMP] spreadsheet_*_oca: Add possibility to make columns dynamic
CarlosRoca13 a4bf2f4
[UPD] Update spreadsheet_oca.pot
ec57d50
[BOT] post-merge updates
OCA-git-bot 66365c7
Update translation files
weblate 82667ed
Translated using Weblate (Italian)
mymage f4f020b
[FIX] spreadsheet_oca: Show the "Add" button in invoice list
CarlosRoca13 6dac57a
Added translation using Weblate (French)
gregory-moka 0271762
Translated using Weblate (French)
gregory-moka 7eef24d
[UPD] Update spreadsheet_oca.pot
e3339d9
[BOT] post-merge updates
OCA-git-bot 8db6287
Update translation files
weblate 5ab67d4
[FIX] spreadsheet_oca: Avoid to show dynamic cols when no cols selected
CarlosRoca13 97cb070
[UPD] Update spreadsheet_oca.pot
3b99c14
[BOT] post-merge updates
OCA-git-bot 6a56060
Update translation files
weblate 1a4ead9
Translated using Weblate (Italian)
mymage 9cba5cd
[FIX] spreadsheet_oca: Clean searchParams of problematic context keys
CarlosRoca13 458dc12
[BOT] post-merge updates
OCA-git-bot 9c3826a
Translated using Weblate (Italian)
mymage 007f72a
[IMP] spreadsheet_oca: Show data only on debug mode. Otherwise it is …
etobella f6a83eb
[BOT] post-merge updates
OCA-git-bot 9114b84
[IMP] spreadsheet_oca: Allow to import XLSX Files
etobella 6afe4b5
[UPD] Update spreadsheet_oca.pot
510b04c
[BOT] post-merge updates
OCA-git-bot da8d62b
Update translation files
weblate 5a7b08c
Translated using Weblate (Italian)
mymage c509e2e
[IMP] spreadsheet_oca: pre-commit auto fixes
luisDIXMIT f99ac01
[MIG] spreadsheet_oca: Migration to 17.0
luisDIXMIT 1b4cf23
[MIG] spreadsheet_oca: Continue migration
etobella 8ace503
[IMP] spreadsheet_oca: Add support for changing locale and currencies.
chrisandrewmann 872b106
[FIX] spreadsheet_oca: Fix when using dynamic number of rows & columns
etobella File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,190 @@ | ||
| =============== | ||
| Spreadsheet Oca | ||
| =============== | ||
|
|
||
| .. | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| !! This file is generated by oca-gen-addon-readme !! | ||
| !! changes will be overwritten. !! | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| !! source digest: sha256:f709ae1a16584c7e8d453647d3efaf814791633d5622f432a33eaa840ab204f9 | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
|
|
||
| .. |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 | ||
| :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 | ||
| :target: https://github.com/OCA/spreadsheet/tree/17.0/spreadsheet_oca | ||
| :alt: OCA/spreadsheet | ||
| .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
| :target: https://translation.odoo-community.org/projects/spreadsheet-17-0/spreadsheet-17-0-spreadsheet_oca | ||
| :alt: Translate me on Weblate | ||
| .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
| :target: https://runboat.odoo-community.org/builds?repo=OCA/spreadsheet&target_branch=17.0 | ||
| :alt: Try me on Runboat | ||
|
|
||
| |badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
|
||
| This module adds a functionality for adding and editing Spreadsheets | ||
| using Odoo CE. | ||
|
|
||
| It is an alternative to the proprietary module ``spreadsheet_edition`` | ||
| of Odoo Enterprise Edition. | ||
|
|
||
| **Table of contents** | ||
|
|
||
| .. contents:: | ||
| :local: | ||
|
|
||
| Usage | ||
| ===== | ||
|
|
||
| **Create a new spreadsheet** | ||
| ---------------------------- | ||
|
|
||
| - Go to 'Spreadsheet' menu | ||
| - Click on 'Create' | ||
| - Put a name, then click on the "Edit" button | ||
|
|
||
| |image0| | ||
|
|
||
| - At this point you switch to spreadsheet editing mode. The editor is | ||
| named ``o-spreadsheet`` and looks like another common spreadsheet web | ||
| editors. (OnlyOffice, Ethercalc, Google Sheets (non-free)). | ||
|
|
||
| |image1| | ||
|
|
||
| - You can use common functions ``SUM()``, ``AVERAGE()``, etc. in the | ||
| cells. For a complete list of functions and their syntax, Refer to | ||
| the documentation | ||
| `https://github.com/odoo/o-spreadsheet/ <https://github.com/odoo/o-spreadsheet/>`__ | ||
| or go to | ||
| `https://odoo.github.io/o-spreadsheet/ <https://odoo.github.io/o-spreadsheet/>`__ | ||
| and click on "Insert > Function". | ||
|
|
||
| |image2| | ||
|
|
||
| - Note: Business Odoo module can add "business functions". This is | ||
| currently the case for the accounting module, which adds the | ||
| following features: | ||
|
|
||
| - ``ODOO.CREDIT(account_codes, date_range)``: Get the total | ||
| credit for the specified account(s) and period. | ||
| - ``ODOO.DEBIT(account_codes, date_range)``: Get the total debit | ||
| for the specified account(s) and period. | ||
| - ``ODOO.BALANCE(account_codes, date_range)``: Get the total | ||
| balance for the specified account(s) and period. | ||
| - ``ODOO.FISCALYEAR.START(day)``: Returns the starting date of | ||
| the fiscal year encompassing the provided date. | ||
| - ``ODOO.FISCALYEAR.END(day)``: Returns the ending date of the | ||
| fiscal year encompassing the provided date. | ||
| - ``ODOO.ACCOUNT.GROUP(type)``: Returns the account ids of a | ||
| given group where type should be a value of the | ||
| ``account_type`` field of ``account.account`` model. | ||
| (``income``, ``asset_receivable``, etc.) | ||
|
|
||
| **Create a new dynamic spreadsheet from pivot** | ||
| ----------------------------------------------- | ||
|
|
||
| - Go to any pivot | ||
| - Press on insert button | ||
| - Select the dynamic rows or dynamic columns option and set a number of | ||
| rows/columns | ||
|
|
||
| A new table that will be updated with the actual or filtered values will | ||
| be added. | ||
|
|
||
| - Note: When a pivot has multiple levels of aggrupations in the rows or | ||
| the columns, the number of rows/columns selected will be transfered | ||
| to each level. | ||
|
|
||
| Example: number of groups -> 2 number of rows -> 3 | ||
|
|
||
| - val1 | ||
|
|
||
| - subval1.1 | ||
| - subval1.2 | ||
| - subval1.3 | ||
|
|
||
| - val2 | ||
|
|
||
| - subval2.1 | ||
| - subval2.2 | ||
| - subval2.3 | ||
|
|
||
| - val3 | ||
|
|
||
| - subval3.1 | ||
| - subval3.2 | ||
| - subval3.3 | ||
|
|
||
| https://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/Hhttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ehttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/rhttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ehttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ https://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ihttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/shttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ https://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ahttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ https://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/vhttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ihttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/shttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/uhttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ahttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/lhttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ https://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ehttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/xhttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ahttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/phttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/lhttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ehttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ https://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ohttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/fhttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ https://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/uhttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/shttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ehttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/:https://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ https://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/.https://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/.https://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ https://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/fhttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ihttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ghttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/uhttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/rhttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ehttps://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/:https://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/:https://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/ | ||
| https://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/../static/description/spreadsheetdynamic_table.gif | ||
|
|
||
| .. |image0| image:: https://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/static/description/spreadsheet_create.png | ||
| .. |image1| image:: https://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/static/description/spreadsheet_edit.png | ||
| .. |image2| image:: https://raw.githubusercontent.com/OCA/spreadsheet/17.0/spreadsheet_oca/static/description/o-spreadsheet.png | ||
|
|
||
| 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 <https://github.com/odoo/odoo/blob/16.0/addons/spreadsheet_account/static/src/accounting_functions.js>`__ | ||
|
|
||
| Known issues / Roadmap | ||
| ====================== | ||
|
|
||
| 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 | ||
| =========== | ||
|
|
||
| Bugs are tracked on `GitHub Issues <https://github.com/OCA/spreadsheet/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 | ||
| `feedback <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**>`_. | ||
|
|
||
| Do not contact contributors directly about support or help with technical issues. | ||
|
|
||
| Credits | ||
| ======= | ||
|
|
||
| Authors | ||
| ------- | ||
|
|
||
| * CreuBlanca | ||
|
|
||
| Contributors | ||
| ------------ | ||
|
|
||
| - Enric Tobella | ||
| - `Tecnativa <https://www.tecnativa.com>`__: | ||
|
|
||
| - Carlos Roca | ||
|
|
||
| Maintainers | ||
| ----------- | ||
|
|
||
| This module is maintained by the OCA. | ||
|
|
||
| .. image:: https://odoo-community.org/logo.png | ||
| :alt: Odoo Community Association | ||
| :target: https://odoo-community.org | ||
|
|
||
| OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
| mission is to support the collaborative development of Odoo features and | ||
| promote its widespread use. | ||
|
|
||
| This module is part of the `OCA/spreadsheet <https://github.com/OCA/spreadsheet/tree/17.0/spreadsheet_oca>`_ project on GitHub. | ||
|
|
||
| You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains hidden or 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,3 @@ | ||
| from . import controllers | ||
| from . import models | ||
| from . import wizards |
This file contains hidden or 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,62 @@ | ||
| # Copyright 2022 CreuBlanca | ||
| # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
|
||
| { | ||
| "name": "Spreadsheet Oca", | ||
| "summary": """ | ||
| Allow to edit spreadsheets""", | ||
| "version": "17.0.1.0.0", | ||
| "license": "AGPL-3", | ||
| "author": "CreuBlanca,Odoo Community Association (OCA)", | ||
| "website": "https://github.com/OCA/spreadsheet", | ||
| "depends": ["spreadsheet", "base_sparse_field", "bus"], | ||
| "data": [ | ||
| "security/security.xml", | ||
| "security/ir.model.access.csv", | ||
| "views/spreadsheet_spreadsheet.xml", | ||
| "data/spreadsheet_spreadsheet_import_mode.xml", | ||
| "wizards/spreadsheet_select_row_number.xml", | ||
| "wizards/spreadsheet_spreadsheet_import.xml", | ||
| ], | ||
| "demo": ["demo/spreadsheet_spreadsheet.xml"], | ||
| "assets": { | ||
| "web.assets_backend": [ | ||
| "spreadsheet_oca/static/src/spreadsheet_tree/spreadsheet_tree_view.esm.js", | ||
| "spreadsheet_oca/static/src/spreadsheet_tree/spreadsheet_tree_view.xml", | ||
| "spreadsheet_oca/static/src/spreadsheet/spreadsheet.scss", | ||
| "spreadsheet_oca/static/src/spreadsheet/spreadsheet_action.esm.js", | ||
| "spreadsheet_oca/static/src/spreadsheet/pivot_controller.esm.js", | ||
| "spreadsheet_oca/static/src/spreadsheet/graph_controller.esm.js", | ||
| "spreadsheet_oca/static/src/spreadsheet/list_controller.esm.js", | ||
| "spreadsheet_oca/static/src/spreadsheet/list_renderer.esm.js", | ||
| ( | ||
| "after", | ||
| "web/static/src/views/graph/graph_controller.xml", | ||
| "spreadsheet_oca/static/src/spreadsheet/graph_controller.xml", | ||
| ), | ||
| ( | ||
| "after", | ||
| "web/static/src/views/list/list_controller.xml", | ||
| "spreadsheet_oca/static/src/spreadsheet/list_controller.xml", | ||
| ), | ||
| ( | ||
| "after", | ||
| "web/static/src/views/pivot/pivot_controller.xml", | ||
| "spreadsheet_oca/static/src/spreadsheet/pivot_controller.xml", | ||
| ), | ||
| ], | ||
| "spreadsheet.o_spreadsheet": [ | ||
| "spreadsheet_oca/static/src/spreadsheet/bundle/spreadsheet.xml", | ||
| "spreadsheet_oca/static/src/spreadsheet/bundle/filter.esm.js", | ||
| "spreadsheet_oca/static/src/spreadsheet/bundle/filter_panel_datasources.esm.js", | ||
| "spreadsheet_oca/static/src/spreadsheet/bundle/spreadsheet_renderer.esm.js", | ||
| "spreadsheet_oca/static/src/spreadsheet/bundle/spreadsheet_controlpanel.esm.js", | ||
| "spreadsheet_oca/static/src/spreadsheet/bundle/spreadsheet_action.esm.js", | ||
| "spreadsheet_oca/static/src/spreadsheet/bundle/odoo_panels.esm.js", | ||
| "spreadsheet_oca/static/src/spreadsheet/bundle/chart_panels.esm.js", | ||
| "spreadsheet_oca/static/src/spreadsheet/bundle/chart_panel.esm.js", | ||
| "spreadsheet_oca/static/src/spreadsheet/utils/dynamic_generators.esm.js", | ||
| "spreadsheet_oca/static/src/pivot/pivot_table.esm.js", | ||
| ], | ||
| }, | ||
| } |
This file contains hidden or 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 hidden or 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)), | ||
| ], | ||
| ) | ||
30 changes: 30 additions & 0 deletions
30
spreadsheet_oca/data/spreadsheet_spreadsheet_import_mode.xml
This file contains hidden or 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,30 @@ | ||
| <?xml version="1.0" encoding="UTF-8" ?> | ||
| <odoo> | ||
| <record | ||
| id="spreadsheet_import_mode_new" | ||
| model="spreadsheet.spreadsheet.import.mode" | ||
| > | ||
| <field name="code">new</field> | ||
| <field name="name">Create spreadsheet</field> | ||
| <field name="sequence" eval="10" /> | ||
| <field name="group_ids" eval="[(4, ref('spreadsheet_oca.group_user'))]" /> | ||
| </record> | ||
| <record | ||
| id="spreadsheet_import_mode_add" | ||
| model="spreadsheet.spreadsheet.import.mode" | ||
| > | ||
| <field name="code">add</field> | ||
| <field name="name">Add to spreadsheet</field> | ||
| <field name="sequence" eval="15" /> | ||
| <field name="group_ids" eval="[(4, ref('spreadsheet_oca.group_user'))]" /> | ||
| </record> | ||
| <record | ||
| id="spreadsheet_import_mode_add_sheet" | ||
| model="spreadsheet.spreadsheet.import.mode" | ||
| > | ||
| <field name="code">add_sheet</field> | ||
| <field name="name">Add sheet to spreadsheet</field> | ||
| <field name="sequence" eval="16" /> | ||
| <field name="group_ids" eval="[(4, ref('spreadsheet_oca.group_user'))]" /> | ||
| </record> | ||
| </odoo> |
This file contains hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Crashes when exporting to XLSX when filestorage object not JSON.
Add this line above:
if hasattr(files, "read"): files = files.read().decode("utf-8")