Skip to content
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

[17.0][MIG] sql_export_excel #844

Open
wants to merge 28 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6c22642
Add sql_export_excel
florian-dacosta Jul 28, 2019
af1d812
Migrate sql_export_excel to v12
florian-dacosta Sep 2, 2019
dc2e55a
Small fixes for v12/python3 standard
florian-dacosta Sep 3, 2019
c81a10a
[UPD] Update sql_export_excel.pot
oca-travis Aug 28, 2020
5b2949e
[UPD] README.rst
OCA-git-bot Aug 28, 2020
f8c2cb1
[ADD] icon.png
OCA-git-bot Aug 28, 2020
73bf78c
[FIX] sql_export_excel: add missing dependency to python lib openpyxl
legalsylvain Apr 8, 2021
1016318
sql_export_excel 12.0.1.1.0
OCA-git-bot Apr 30, 2021
7a2ac79
[IMP] sql_export_excel: black, isort, prettier
hkapatel-initos Jun 21, 2021
f87fd82
[MIG] sql_export_excel: Migration to 14.0
hkapatel-initos Jun 23, 2021
29b78bc
[UPD] README.rst
OCA-git-bot Jul 29, 2021
7455ec7
[UPD] Update sql_export_excel.pot
oca-travis Aug 6, 2021
9a46657
[UPD] Update sql_export_excel.pot
oca-travis Sep 2, 2021
43410f1
[IMP] sql_export_excel: pylint
yankinmax Jan 31, 2022
f91cb72
[MIG] sql_export_excel: Migration to 15.0
yankinmax Jan 31, 2022
857e292
[UPD] Update sql_export_excel.pot
Feb 2, 2022
46a26ce
[UPD] README.rst
OCA-git-bot Feb 2, 2022
4e4cd2a
Added translation using Weblate (Catalan)
jabelchi Jun 15, 2022
d4f55e0
Translated using Weblate (Catalan)
jabelchi Jun 15, 2022
d78c6d4
[16.0][MIG] sql_export_excel : migration to v16
florian-dacosta Dec 13, 2022
9ba4283
[FIX] Manage jsonb fields
florian-dacosta Mar 3, 2023
8911a81
[UPD] Update sql_export_excel.pot
Sep 25, 2023
a7d78d2
[BOT] post-merge updates
OCA-git-bot Sep 25, 2023
871e639
Added translation using Weblate (Spanish)
Ivorra78 Oct 15, 2023
12a6df9
Translated using Weblate (Spanish)
Ivorra78 Oct 15, 2023
5babccd
Added translation using Weblate (Italian)
mymage Jan 10, 2024
2a5b9d1
[IMP] sql_export_excel: black, isort, prettier
sanderlienaerts Jan 15, 2024
61ad117
[MIG] sql_export_excel: Migration to 17.0
sanderlienaerts Jan 15, 2024
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
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# generated from manifests external_dependencies
openpyxl
xlrd
xlsxwriter
90 changes: 90 additions & 0 deletions sql_export_excel/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
================
SQL Export Excel
================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:140000da7d6e4acfcacee34bf261cfa64e2d76d8e01e4aaccfc11cf3bc93b288
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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%2Freporting--engine-lightgray.png?logo=github
:target: https://github.com/OCA/reporting-engine/tree/17.0/sql_export_excel
:alt: OCA/reporting-engine
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/reporting-engine-17-0/reporting-engine-17-0-sql_export_excel
: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/reporting-engine&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Add the possibility to extract data from a sql query toward an excel
file. It is also possible to provide an template excel file for a query.
In this case, the data will be inserted in the specified sheet of the
provided excel file. This is usefull when doing a lot of calculation in
excel and the data is coming from Odoo.

**Table of contents**

.. contents::
:local:

Configuration
=============

If you want Odoo to update an existing excel file, you should create an
attachment with the excel file and configure this attachment on the
query. Then, you can configure the query to indicate if Odoo should
export the header and where it should insert the data. By default, it
will insert it in the first sheet, at first row/column.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/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/reporting-engine/issues/new?body=module:%20sql_export_excel%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
-------

* Akretion

Contributors
------------

- Florian da Costa <[email protected]>
- Helly kapatel <[email protected]>

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/reporting-engine <https://github.com/OCA/reporting-engine/tree/17.0/sql_export_excel>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions sql_export_excel/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
22 changes: 22 additions & 0 deletions sql_export_excel/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2019 Akretion
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

{
"name": "SQL Export Excel",
"version": "17.0.1.0.0",
"author": "Akretion,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/reporting-engine",
"license": "AGPL-3",
"category": "Generic Modules/Others",
"summary": "Allow to export a sql query to an excel file.",
"depends": ["sql_export"],
"external_dependencies": {
"python": [
"openpyxl",
],
},
"data": [
"views/sql_export_view.xml",
],
"installable": True,
}
122 changes: 122 additions & 0 deletions sql_export_excel/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sql_export_excel
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2022-06-15 18:05+0000\n"
"Last-Translator: jabelchi <[email protected]>\n"
"Language-Team: none\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n"

#. module: sql_export_excel
#: model:ir.model.fields,field_description:sql_export_excel.field_sql_export__col_position
msgid "Column Position"
msgstr "Posició columna"

#. module: sql_export_excel
#: model:ir.model.fields.selection,name:sql_export_excel.selection__sql_export__file_format__excel
msgid "Excel"
msgstr "Excel"

#. module: sql_export_excel
#: model:ir.model.fields,field_description:sql_export_excel.field_sql_export__attachment_id
msgid "Excel Template"
msgstr "Plantilla Excel"

#. module: sql_export_excel
#: model:ir.model.fields,field_description:sql_export_excel.field_sql_export__file_format
msgid "File Format"
msgstr "Format de fitxer"

#. module: sql_export_excel
#: model:ir.model.fields,field_description:sql_export_excel.field_sql_export__header
msgid "Header"
msgstr "Capçalera"

#. module: sql_export_excel
#: model:ir.model.fields,help:sql_export_excel.field_sql_export__attachment_id
msgid ""
"If you configure an excel file (in xlsx format) here, the result of the query will be injected in it.\n"
"It is usefull to feed data in a excel file pre-configured with calculation"
msgstr ""
"Si configureu aquí un fitxer Excel (en format xlsx), s'hi injectarà el "
"resultat de la consulta.\n"
"Això és útil per a carregar dades en un fitxer Excel pre-configurat amb "
"càlculs"

#. module: sql_export_excel
#: model:ir.model.fields,help:sql_export_excel.field_sql_export__col_position
msgid "Indicate from which column the result of the query should be injected."
msgstr ""
"Indiqueu des de quina columna ha de carregar-se el resultat de la consulta."

#. module: sql_export_excel
#: model:ir.model.fields,help:sql_export_excel.field_sql_export__row_position
msgid "Indicate from which row the result of the query should be injected."
msgstr ""
"Indiqueu des de quina fila ha de carregar-se el resultat de la consulta."

#. module: sql_export_excel
#: model:ir.model.fields,help:sql_export_excel.field_sql_export__header
msgid "Indicate if the header should be exported to the file."
msgstr "Indiqueu si la capçalera ha d'exportar-se al fitxer."

#. module: sql_export_excel
#: model:ir.model.fields,help:sql_export_excel.field_sql_export__sheet_position
msgid ""
"Indicate the sheet's position of the excel template where the result of the "
"sql query should be injected."
msgstr ""
"Indiqueu la posició del full de la plantilla Excel on s'ha de carregar el "
"resultat de la consulta SQL."

#. module: sql_export_excel
#: model:ir.model.fields,field_description:sql_export_excel.field_sql_export__row_position
msgid "Row Position"
msgstr "Posició fila"

#. module: sql_export_excel
#: model:ir.model,name:sql_export_excel.model_sql_export
msgid "SQL export"
msgstr "Exportació SQL"

#. module: sql_export_excel
#: model:ir.model.fields,field_description:sql_export_excel.field_sql_export__sheet_position
msgid "Sheet Position"
msgstr "Posició del full"

#. module: sql_export_excel
#: code:addons/sql_export_excel/models/sql_export.py:0
#, python-format
msgid ""
"The Excel Template file contains less than %s sheets Please, adjust the "
"Sheet Position parameter."
msgstr ""
"La plantilla Excel conté menys de %s fulls. Si us plau, corregiu el "
"paràmetre de la posició del full."

#. module: sql_export_excel
#: code:addons/sql_export_excel/models/sql_export.py:0
#, python-format
msgid "The column position can't be less than 1."
msgstr "La posició de la columna no pot ser menor que 1."

#. module: sql_export_excel
#: code:addons/sql_export_excel/models/sql_export.py:0
#, python-format
msgid "The row position can't be less than 1."
msgstr "La posició de la fila no pot ser menor que 1."

#. module: sql_export_excel
#: code:addons/sql_export_excel/models/sql_export.py:0
#, python-format
msgid "The sheet position can't be less than 1."
msgstr "La posició del full no pot ser menor que 1."
126 changes: 126 additions & 0 deletions sql_export_excel/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sql_export_excel
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-10-15 19:36+0000\n"
"Last-Translator: Ivorra78 <[email protected]>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: sql_export_excel
#: model:ir.model.fields,field_description:sql_export_excel.field_sql_export__col_position
msgid "Column Position"
msgstr "Posición de la columna"

#. module: sql_export_excel
#: model:ir.model.fields.selection,name:sql_export_excel.selection__sql_export__file_format__excel
msgid "Excel"
msgstr "Excel"

#. module: sql_export_excel
#: model:ir.model.fields,field_description:sql_export_excel.field_sql_export__attachment_id
msgid "Excel Template"
msgstr "Plantilla Excel"

#. module: sql_export_excel
#: model:ir.model.fields,field_description:sql_export_excel.field_sql_export__file_format
msgid "File Format"
msgstr "Formato del archivo"

#. module: sql_export_excel
#: model:ir.model.fields,field_description:sql_export_excel.field_sql_export__header
msgid "Header"
msgstr "Cabecera"

#. module: sql_export_excel
#: model:ir.model.fields,help:sql_export_excel.field_sql_export__attachment_id
msgid ""
"If you configure an excel file (in xlsx format) here, the result of the query will be injected in it.\n"
"It is usefull to feed data in a excel file pre-configured with calculation"
msgstr ""
"Si configura aquí un fichero excel (en formato xlsx), el resultado de la "
"consulta se inyectará en él.\n"
"Es útil para alimentar los datos en un archivo excel preconfigurado con "
"cálculo"

#. module: sql_export_excel
#: model:ir.model.fields,help:sql_export_excel.field_sql_export__col_position
msgid "Indicate from which column the result of the query should be injected."
msgstr ""
"Indique a partir de qué columna debe inyectarse el resultado de la consulta."

#. module: sql_export_excel
#: model:ir.model.fields,help:sql_export_excel.field_sql_export__row_position
msgid "Indicate from which row the result of the query should be injected."
msgstr ""
"Indica a partir de qué fila debe inyectarse el resultado de la consulta."

#. module: sql_export_excel
#: model:ir.model.fields,help:sql_export_excel.field_sql_export__header
msgid "Indicate if the header should be exported to the file."
msgstr "Indique si la cabecera debe exportarse al fichero."

#. module: sql_export_excel
#: model:ir.model.fields,help:sql_export_excel.field_sql_export__sheet_position
msgid ""
"Indicate the sheet's position of the excel template where the result of the "
"sql query should be injected."
msgstr ""
"Indique la posición de la hoja de la plantilla excel donde debe inyectarse "
"el resultado de la consulta sql."

#. module: sql_export_excel
#: model:ir.model.fields,field_description:sql_export_excel.field_sql_export__row_position
msgid "Row Position"
msgstr "Posición de la fila"

#. module: sql_export_excel
#: model:ir.model,name:sql_export_excel.model_sql_export
msgid "SQL export"
msgstr "Exportar SQL"

#. module: sql_export_excel
#: model:ir.model.fields,field_description:sql_export_excel.field_sql_export__sheet_position
msgid "Sheet Position"
msgstr "Posición de la hoja"

#. module: sql_export_excel
#. odoo-python
#: code:addons/sql_export_excel/models/sql_export.py:0
#, python-format
msgid ""
"The Excel Template file contains less than %s sheets Please, adjust the "
"Sheet Position parameter."
msgstr ""
"El archivo Plantilla Excel contiene menos de %s hojas Por favor, ajuste el "
"parámetro Posición de la Hoja."

#. module: sql_export_excel
#. odoo-python
#: code:addons/sql_export_excel/models/sql_export.py:0
#, python-format
msgid "The column position can't be less than 1."
msgstr "La posición de la columna no puede ser inferior a 1."

#. module: sql_export_excel
#. odoo-python
#: code:addons/sql_export_excel/models/sql_export.py:0
#, python-format
msgid "The row position can't be less than 1."
msgstr "La posición de la fila no puede ser inferior a 1."

#. module: sql_export_excel
#. odoo-python
#: code:addons/sql_export_excel/models/sql_export.py:0
#, python-format
msgid "The sheet position can't be less than 1."
msgstr "La posición de la hoja no puede ser inferior a 1."
Loading
Loading