diff --git a/spreadsheet_oca/README.rst b/spreadsheet_oca/README.rst
index 57dc18c8..8e135bf9 100644
--- a/spreadsheet_oca/README.rst
+++ b/spreadsheet_oca/README.rst
@@ -7,7 +7,7 @@ Spreadsheet Oca
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !! source digest: sha256:e5b362410ca5c8eed5057aba019e80bb65406834896e2299d36cf6bc86a83560
+ !! source digest: sha256:4214e988c2bc92cac7718d1e1e21d292c7e2821e3151138232f3d8cef77b2c4b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -30,11 +30,55 @@ Spreadsheet Oca
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
+
+.. figure:: https://raw.githubusercontent.com/OCA/spreadsheet/16.0/spreadsheet_oca/static/description/spreadsheet_create.png
+
+* 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)).
+
+.. figure:: https://raw.githubusercontent.com/OCA/spreadsheet/16.0/spreadsheet_oca/static/description/spreadsheet_edit.png
+
+* 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/
+ or go to https://odoo.github.io/o-spreadsheet/ and click on "Insert > Function".
+
+.. figure:: https://raw.githubusercontent.com/OCA/spreadsheet/16.0/spreadsheet_oca/static/description/o-spreadsheet.png
+
+* 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.)
+
+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
======================
diff --git a/spreadsheet_oca/__manifest__.py b/spreadsheet_oca/__manifest__.py
index 41e091fe..66661b96 100644
--- a/spreadsheet_oca/__manifest__.py
+++ b/spreadsheet_oca/__manifest__.py
@@ -17,6 +17,7 @@
"data/spreadsheet_spreadsheet_import_mode.xml",
"wizards/spreadsheet_spreadsheet_import.xml",
],
+ "demo": ["demo/spreadsheet_spreadsheet.xml"],
"assets": {
"web.assets_backend": [
"spreadsheet_oca/static/src/spreadsheet/spreadsheet.scss",
diff --git a/spreadsheet_oca/demo/demo_spreadsheet.json b/spreadsheet_oca/demo/demo_spreadsheet.json
new file mode 100644
index 00000000..79a0811d
--- /dev/null
+++ b/spreadsheet_oca/demo/demo_spreadsheet.json
@@ -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": {}
+}
diff --git a/spreadsheet_oca/demo/spreadsheet_spreadsheet.xml b/spreadsheet_oca/demo/spreadsheet_spreadsheet.xml
new file mode 100644
index 00000000..0ad098ef
--- /dev/null
+++ b/spreadsheet_oca/demo/spreadsheet_spreadsheet.xml
@@ -0,0 +1,12 @@
+
+
+
+ Demo spreadsheet
+
+
+
+
diff --git a/spreadsheet_oca/readme/DESCRIPTION.rst b/spreadsheet_oca/readme/DESCRIPTION.rst
index 7fbd3af7..3a170060 100644
--- a/spreadsheet_oca/readme/DESCRIPTION.rst
+++ b/spreadsheet_oca/readme/DESCRIPTION.rst
@@ -1 +1,3 @@
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.
diff --git a/spreadsheet_oca/readme/DEVELOP.rst b/spreadsheet_oca/readme/DEVELOP.rst
new file mode 100644
index 00000000..c4159040
--- /dev/null
+++ b/spreadsheet_oca/readme/DEVELOP.rst
@@ -0,0 +1,2 @@
+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
diff --git a/spreadsheet_oca/readme/USAGE.rst b/spreadsheet_oca/readme/USAGE.rst
new file mode 100644
index 00000000..e8905026
--- /dev/null
+++ b/spreadsheet_oca/readme/USAGE.rst
@@ -0,0 +1,32 @@
+**Create a new spreadsheet**
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+* Go to 'Spreadsheet' menu
+* Click on 'Create'
+* Put a name, then click on the "Edit" button
+
+.. figure:: ../static/description/spreadsheet_create.png
+
+* 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)).
+
+.. figure:: ../static/description/spreadsheet_edit.png
+
+* 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/
+ or go to https://odoo.github.io/o-spreadsheet/ and click on "Insert > Function".
+
+.. figure:: ../static/description/o-spreadsheet.png
+
+* 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.)
diff --git a/spreadsheet_oca/static/description/index.html b/spreadsheet_oca/static/description/index.html
index ac85056a..25a4e5d4 100644
--- a/spreadsheet_oca/static/description/index.html
+++ b/spreadsheet_oca/static/description/index.html
@@ -367,36 +367,94 @@
Spreadsheet Oca
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!! source digest: sha256:e5b362410ca5c8eed5057aba019e80bb65406834896e2299d36cf6bc86a83560
+!! source digest: sha256:4214e988c2bc92cac7718d1e1e21d292c7e2821e3151138232f3d8cef77b2c4b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
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
+
+
+
+
+
+- Go to ‘Spreadsheet’ menu
+- Click on ‘Create’
+- Put a name, then click on the “Edit” button
+
+
+
+- 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)).
+
+
+
+
+
+
+
+
-
+
-
+
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.
-
+
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
@@ -404,21 +462,21 @@
Do not contact contributors directly about support or help with technical issues.
-
+
-
+
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose
diff --git a/spreadsheet_oca/static/description/o-spreadsheet.png b/spreadsheet_oca/static/description/o-spreadsheet.png
new file mode 100644
index 00000000..5d8c9e28
Binary files /dev/null and b/spreadsheet_oca/static/description/o-spreadsheet.png differ
diff --git a/spreadsheet_oca/static/description/spreadsheet_create.png b/spreadsheet_oca/static/description/spreadsheet_create.png
new file mode 100644
index 00000000..7e94ba1d
Binary files /dev/null and b/spreadsheet_oca/static/description/spreadsheet_create.png differ
diff --git a/spreadsheet_oca/static/description/spreadsheet_edit.png b/spreadsheet_oca/static/description/spreadsheet_edit.png
new file mode 100644
index 00000000..e4a57314
Binary files /dev/null and b/spreadsheet_oca/static/description/spreadsheet_edit.png differ