diff --git a/account_move_line_report_xls/README.rst b/account_move_line_report_xls/README.rst new file mode 100644 index 000000000000..99d3fb552311 --- /dev/null +++ b/account_move_line_report_xls/README.rst @@ -0,0 +1,113 @@ +============================= +Account Move Line XLSX export +============================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:585fb4c438ac263d7904ecbdcae3a45c8ab9b0c126a164b7df9bd2a10ec7fc55 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Faccount--financial--reporting-lightgray.png?logo=github + :target: https://github.com/OCA/account-financial-reporting/tree/16.0/account_move_line_report_xls + :alt: OCA/account-financial-reporting +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/account-financial-reporting-16-0/account-financial-reporting-16-0-account_move_line_report_xls + :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/account-financial-reporting&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module extends the functionality of the journal items +('account.move.line') list view and allow you to export the selected lines. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you need to: + +* go to the list view of the journal items +* select the lines you wish to export +* click on the button on top to export + +The Excel export can be tailored to your exact needs via the following methods +of the 'account.move.line' object: + +* **_report_xlsx_fields** + + Add/drop columns or change order from the list of columns that are defined + in the Excel template. + + The following fields are defined in the Excel template: + + move, name, date, journal, period, partner, account, + date_maturity, debit, credit, balance, + reconcile, reconcile_partial, analytic_account, + ref, partner_ref, tax_code, tax_amount, amount_residual, + amount_currency, currency_name, company_currency, + amount_residual_currency, product, product_ref', product_uom, quantity, + statement, invoice, narration, blocked + +* **_report_xlsx_template** + + Change/extend the Excel template. + +Known issues / Roadmap +====================== + +* Add support for the analytic_distribution field + +Bug Tracker +=========== + +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 +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Noviat + +Contributors +~~~~~~~~~~~~ + +* Luc De Meyer + +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/account-financial-reporting `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_move_line_report_xls/__init__.py b/account_move_line_report_xls/__init__.py new file mode 100644 index 000000000000..020337dd8fe6 --- /dev/null +++ b/account_move_line_report_xls/__init__.py @@ -0,0 +1,11 @@ +from . import models + +try: + from . import report +except ImportError: + import logging + + logging.getLogger("odoo.module").warning( + """report_xlsx_helper not available in addons path. + account_move_line_report_xls will not be usable""" + ) diff --git a/account_move_line_report_xls/__manifest__.py b/account_move_line_report_xls/__manifest__.py new file mode 100644 index 000000000000..25fb5e5e9781 --- /dev/null +++ b/account_move_line_report_xls/__manifest__.py @@ -0,0 +1,15 @@ +# Copyright 2009-2020 Noviat. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Account Move Line XLSX export", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "author": "Noviat, Odoo Community Association (OCA)", + "category": "Accounting & Finance", + "website": "https://github.com/OCA/account-financial-reporting", + "summary": "Journal Items Excel export", + "depends": ["account", "report_xlsx_helper"], + "data": ["report/account_move_line_xlsx.xml"], + "installable": True, +} diff --git a/account_move_line_report_xls/i18n/account_move_line_report_xls.pot b/account_move_line_report_xls/i18n/account_move_line_report_xls.pot new file mode 100644 index 000000000000..824219fe0b55 --- /dev/null +++ b/account_move_line_report_xls/i18n/account_move_line_report_xls.pot @@ -0,0 +1,227 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_move_line_report_xls +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Account" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Am. Currency" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Analytic Account" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Analytic Account Reference" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Balance" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Comp. Curr." +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Credit" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Curr." +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Debit" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Effective Date" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Entry" +msgstr "" + +#. module: account_move_line_report_xls +#: model:ir.actions.report,name:account_move_line_report_xls.action_account_move_line_xlsx +msgid "Export Selected Lines" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Id" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Invoice" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Journal" +msgstr "" + +#. module: account_move_line_report_xls +#: model:ir.model,name:account_move_line_report_xls.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Journal Items" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Lit." +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Matched Credits" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Matched Debits" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Maturity Date" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Name" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Notes" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Partner" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Partner Reference" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Product" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Product Reference" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Qty" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Rec." +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Reconcile Amount" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Reference" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Res. Am. in Curr." +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Residual Amount" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Statement" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Unit of Measure" +msgstr "" + +#. module: account_move_line_report_xls +#: model:ir.model,name:account_move_line_report_xls.model_report_account_move_line_report_xls_account_move_line_xlsx +msgid "XLSX report for account move lines." +msgstr "" diff --git a/account_move_line_report_xls/i18n/es.po b/account_move_line_report_xls/i18n/es.po new file mode 100644 index 000000000000..a65e215b8ef7 --- /dev/null +++ b/account_move_line_report_xls/i18n/es.po @@ -0,0 +1,230 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_move_line_report_xls +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-03-23 02:22+0000\n" +"Last-Translator: Ivorra78 \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: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Account" +msgstr "Cuenta" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Am. Currency" +msgstr "Im. Divisa" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Analytic Account" +msgstr "Cuenta Analítica" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Analytic Account Reference" +msgstr "Cuenta Analítica Referencia" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Balance" +msgstr "Saldo" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Comp. Curr." +msgstr "Calc. Div." + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Credit" +msgstr "Crédito" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Curr." +msgstr "Div." + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Debit" +msgstr "Débito" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Effective Date" +msgstr "Fecha Efectiva" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Entry" +msgstr "Entrada" + +#. module: account_move_line_report_xls +#: model:ir.actions.report,name:account_move_line_report_xls.action_account_move_line_xlsx +msgid "Export Selected Lines" +msgstr "Exportar Líneas Seleccionadas" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Id" +msgstr "Id" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Invoice" +msgstr "Factura" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Journal" +msgstr "Diario" + +#. module: account_move_line_report_xls +#: model:ir.model,name:account_move_line_report_xls.model_account_move_line +msgid "Journal Item" +msgstr "Artículo Diario" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Journal Items" +msgstr "Artículo de Diario" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Lit." +msgstr "Il." + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Matched Credits" +msgstr "Créditos conciliados" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Matched Debits" +msgstr "Débitos conciliados" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Maturity Date" +msgstr "Fecha de Vencimiento" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Name" +msgstr "Nombre" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Notes" +msgstr "Notas" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Partner" +msgstr "Socio" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Partner Reference" +msgstr "Referencia del Socio" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Product" +msgstr "Producto" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Product Reference" +msgstr "Referencia del Producto" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Qty" +msgstr "Ctd" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Rec." +msgstr "Reg." + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Reconcile Amount" +msgstr "Conciliar Importe" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Reference" +msgstr "Referencia" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Res. Am. in Curr." +msgstr "Rec. Imp. Div." + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Residual Amount" +msgstr "Importe Residual" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Statement" +msgstr "Extracto" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Unit of Measure" +msgstr "Unidad de Medida" + +#. module: account_move_line_report_xls +#: model:ir.model,name:account_move_line_report_xls.model_report_account_move_line_report_xls_account_move_line_xlsx +msgid "XLSX report for account move lines." +msgstr "Informe XLSX para líneas de movimiento de cuentas." diff --git a/account_move_line_report_xls/i18n/fr.po b/account_move_line_report_xls/i18n/fr.po new file mode 100644 index 000000000000..0abc505149fe --- /dev/null +++ b/account_move_line_report_xls/i18n/fr.po @@ -0,0 +1,260 @@ +# French translation of Odoo. +# This file contains the translation of the following modules: +# * account_move_line_report_xls +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-05-16 12:31:16.568000\n" +"PO-Revision-Date: 2016-05-16 12:31:16.568000\n" +"Last-Translator: Luc De Meyer (Noviat nv/sa)\n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Account" +msgstr "Compte" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Am. Currency" +msgstr "Montant devise" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Analytic Account" +msgstr "Compte analytique" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Analytic Account Reference" +msgstr "Référence compte analytique" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Balance" +msgstr "Solde" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Comp. Curr." +msgstr "Dev. Soc." + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Credit" +msgstr "Crédit" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Curr." +msgstr "Dev." + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Debit" +msgstr "Débit" + +#. module: account_move_line_report_xls +#: model:ir.model.fields,field_description:account_move_line_report_xls.field_account_move_line__display_name +#: model:ir.model.fields,field_description:account_move_line_report_xls.field_report_account_move_line_report_xls_account_move_line_xlsx__display_name +msgid "Display Name" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Effective Date" +msgstr "Date" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Entry" +msgstr "Écriture" + +#. module: account_move_line_report_xls +#: model:ir.actions.report,name:account_move_line_report_xls.action_account_move_line_xlsx +msgid "Export Selected Lines" +msgstr "" + +#. module: account_move_line_report_xls +#: model:ir.model.fields,field_description:account_move_line_report_xls.field_account_move_line__id +#: model:ir.model.fields,field_description:account_move_line_report_xls.field_report_account_move_line_report_xls_account_move_line_xlsx__id +msgid "ID" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Id" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Invoice" +msgstr "Facture" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Journal" +msgstr "Journal" + +#. module: account_move_line_report_xls +#: model:ir.model,name:account_move_line_report_xls.model_account_move_line +#, fuzzy +msgid "Journal Item" +msgstr "Écritures comptables" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Journal Items" +msgstr "Écritures comptables" + +#. module: account_move_line_report_xls +#: model:ir.model.fields,field_description:account_move_line_report_xls.field_account_move_line____last_update +#: model:ir.model.fields,field_description:account_move_line_report_xls.field_report_account_move_line_report_xls_account_move_line_xlsx____last_update +msgid "Last Modified on" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Lit." +msgstr "Lit." + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Matched Credits" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Matched Debits" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Maturity Date" +msgstr "Date d'échéance" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Name" +msgstr "Nom" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Notes" +msgstr "Notes" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Partner" +msgstr "Partenaire" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Partner Reference" +msgstr "Réf. Partenaire" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Product" +msgstr "Article" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Product Reference" +msgstr "Réf. Article" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Qty" +msgstr "Qty" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Rec." +msgstr "Let." + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, fuzzy, python-format +msgid "Reconcile Amount" +msgstr "Montant résiduel" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Reference" +msgstr "Référence" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Res. Am. in Curr." +msgstr "Montant résiduel en dev." + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Residual Amount" +msgstr "Montant résiduel" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Statement" +msgstr "Relevé" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Unit of Measure" +msgstr "Unité de mesure" + +#. module: account_move_line_report_xls +#: model:ir.model,name:account_move_line_report_xls.model_report_account_move_line_report_xls_account_move_line_xlsx +msgid "XLSX report for account move lines." +msgstr "" + +#~ msgid "Period" +#~ msgstr "Période" + +#~ msgid "Part. Rec." +#~ msgstr "Let. Part." + +#~ msgid "Tax Code" +#~ msgstr "Case TVA" + +#~ msgid "Tax/Base Amount" +#~ msgstr "Montant TVA/Base" diff --git a/account_move_line_report_xls/i18n/nl.po b/account_move_line_report_xls/i18n/nl.po new file mode 100644 index 000000000000..dae17aadeeef --- /dev/null +++ b/account_move_line_report_xls/i18n/nl.po @@ -0,0 +1,260 @@ +# Dutch translation of Odoo. +# This file contains the translation of the following modules: +# * account_move_line_report_xls +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-05-16 12:31:16.564000\n" +"PO-Revision-Date: 2016-05-16 12:31:16.564000\n" +"Last-Translator: Luc De Meyer (Noviat nv/sa)\n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Account" +msgstr "Rekening" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Am. Currency" +msgstr "Bedrag valuta" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Analytic Account" +msgstr "Kostenplaats" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Analytic Account Reference" +msgstr "Kostenplaats referentie" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Balance" +msgstr "Saldo" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Comp. Curr." +msgstr "Bedr. Val." + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Credit" +msgstr "Credit" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Curr." +msgstr "Val." + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Debit" +msgstr "Debet" + +#. module: account_move_line_report_xls +#: model:ir.model.fields,field_description:account_move_line_report_xls.field_account_move_line__display_name +#: model:ir.model.fields,field_description:account_move_line_report_xls.field_report_account_move_line_report_xls_account_move_line_xlsx__display_name +msgid "Display Name" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Effective Date" +msgstr "Datum" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Entry" +msgstr "Boeking" + +#. module: account_move_line_report_xls +#: model:ir.actions.report,name:account_move_line_report_xls.action_account_move_line_xlsx +msgid "Export Selected Lines" +msgstr "" + +#. module: account_move_line_report_xls +#: model:ir.model.fields,field_description:account_move_line_report_xls.field_account_move_line__id +#: model:ir.model.fields,field_description:account_move_line_report_xls.field_report_account_move_line_report_xls_account_move_line_xlsx__id +msgid "ID" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Id" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Invoice" +msgstr "Factuur" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Journal" +msgstr "Dagboek" + +#. module: account_move_line_report_xls +#: model:ir.model,name:account_move_line_report_xls.model_account_move_line +#, fuzzy +msgid "Journal Item" +msgstr "Boekingsregels" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Journal Items" +msgstr "Boekingsregels" + +#. module: account_move_line_report_xls +#: model:ir.model.fields,field_description:account_move_line_report_xls.field_account_move_line____last_update +#: model:ir.model.fields,field_description:account_move_line_report_xls.field_report_account_move_line_report_xls_account_move_line_xlsx____last_update +msgid "Last Modified on" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Lit." +msgstr "Lit." + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Matched Credits" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Matched Debits" +msgstr "" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Maturity Date" +msgstr "Vervaldatum" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Name" +msgstr "Naam" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Notes" +msgstr "Notities" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Partner" +msgstr "Partner" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Partner Reference" +msgstr "Ref. Partner" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Product" +msgstr "Product" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Product Reference" +msgstr "Ref. Product" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Qty" +msgstr "HvH" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Rec." +msgstr "Rec." + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, fuzzy, python-format +msgid "Reconcile Amount" +msgstr "Restbedrag" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Reference" +msgstr "Referentie" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Res. Am. in Curr." +msgstr "Restbedrag in val." + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Residual Amount" +msgstr "Restbedrag" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Statement" +msgstr "Uitreksel" + +#. module: account_move_line_report_xls +#: code:addons/account_move_line_report_xls/report/account_move_line_xlsx.py:0 +#, python-format +msgid "Unit of Measure" +msgstr "Maateenheid" + +#. module: account_move_line_report_xls +#: model:ir.model,name:account_move_line_report_xls.model_report_account_move_line_report_xls_account_move_line_xlsx +msgid "XLSX report for account move lines." +msgstr "" + +#~ msgid "Period" +#~ msgstr "Periode" + +#~ msgid "Part. Rec." +#~ msgstr "Rec. Part." + +#~ msgid "Tax Code" +#~ msgstr "BTW vak" + +#~ msgid "Tax/Base Amount" +#~ msgstr "Bedrag BTW/Mvh" diff --git a/account_move_line_report_xls/models/__init__.py b/account_move_line_report_xls/models/__init__.py new file mode 100644 index 000000000000..8795b3bea648 --- /dev/null +++ b/account_move_line_report_xls/models/__init__.py @@ -0,0 +1 @@ +from . import account_move_line diff --git a/account_move_line_report_xls/models/account_move_line.py b/account_move_line_report_xls/models/account_move_line.py new file mode 100644 index 000000000000..6b009f3040ea --- /dev/null +++ b/account_move_line_report_xls/models/account_move_line.py @@ -0,0 +1,59 @@ +# Copyright 2009-2020 Noviat. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import api, models + +from odoo.addons.report_xlsx_helper.report.report_xlsx_abstract import ( + ReportXlsxAbstract, +) + +_render = ReportXlsxAbstract._render + + +class AccountMoveLine(models.Model): + _inherit = "account.move.line" + + # Change list in custom module e.g. to add/drop columns or change order + @api.model + def _report_xlsx_fields(self): + return [ + "move", + "name", + "date", + "journal", + "partner", + "account", + "date_maturity", + "debit", + "credit", + "balance", + "full_reconcile", + "reconcile_amount", + # 'ref', 'partner_ref', + # 'amount_residual', 'amount_currency', 'currency_name', + # 'company_currency', 'amount_residual_currency', + # 'product', 'product_ref', 'product_uom', 'quantity', + # 'statement', 'invoice', 'narration', 'blocked', + # 'id', 'matched_debit_ids', 'matched_credit_ids', + ] + + # Change/Add Template entries + @api.model + def _report_xlsx_template(self): + """ + Template updates, e.g. + + my_change = { + 'move': { + 'header': { + 'value': 'My Move Title', + }, + 'lines': { + 'value': _render("line.move_id.name or ''"), + }, + 'width': 20, + }, + } + return my_change + """ + return {} diff --git a/account_move_line_report_xls/readme/CONTRIBUTORS.rst b/account_move_line_report_xls/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000000..044d1a0013f7 --- /dev/null +++ b/account_move_line_report_xls/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Luc De Meyer diff --git a/account_move_line_report_xls/readme/DESCRIPTION.rst b/account_move_line_report_xls/readme/DESCRIPTION.rst new file mode 100644 index 000000000000..d342869c74e0 --- /dev/null +++ b/account_move_line_report_xls/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module extends the functionality of the journal items +('account.move.line') list view and allow you to export the selected lines. diff --git a/account_move_line_report_xls/readme/ROADMAP.rst b/account_move_line_report_xls/readme/ROADMAP.rst new file mode 100644 index 000000000000..9c5e9d7da0c1 --- /dev/null +++ b/account_move_line_report_xls/readme/ROADMAP.rst @@ -0,0 +1 @@ +* Add support for the analytic_distribution field diff --git a/account_move_line_report_xls/readme/USAGE.rst b/account_move_line_report_xls/readme/USAGE.rst new file mode 100644 index 000000000000..801143bb5692 --- /dev/null +++ b/account_move_line_report_xls/readme/USAGE.rst @@ -0,0 +1,27 @@ +To use this module, you need to: + +* go to the list view of the journal items +* select the lines you wish to export +* click on the button on top to export + +The Excel export can be tailored to your exact needs via the following methods +of the 'account.move.line' object: + +* **_report_xlsx_fields** + + Add/drop columns or change order from the list of columns that are defined + in the Excel template. + + The following fields are defined in the Excel template: + + move, name, date, journal, period, partner, account, + date_maturity, debit, credit, balance, + reconcile, reconcile_partial, analytic_account, + ref, partner_ref, tax_code, tax_amount, amount_residual, + amount_currency, currency_name, company_currency, + amount_residual_currency, product, product_ref', product_uom, quantity, + statement, invoice, narration, blocked + +* **_report_xlsx_template** + + Change/extend the Excel template. diff --git a/account_move_line_report_xls/report/__init__.py b/account_move_line_report_xls/report/__init__.py new file mode 100644 index 000000000000..dc9f47cd257c --- /dev/null +++ b/account_move_line_report_xls/report/__init__.py @@ -0,0 +1 @@ +from . import account_move_line_xlsx diff --git a/account_move_line_report_xls/report/account_move_line_xlsx.py b/account_move_line_report_xls/report/account_move_line_xlsx.py new file mode 100644 index 000000000000..f506f17a0344 --- /dev/null +++ b/account_move_line_report_xls/report/account_move_line_xlsx.py @@ -0,0 +1,375 @@ +# Copyright 2009-2020 Noviat +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import _, models + +from odoo.addons.report_xlsx_helper.report.report_xlsx_format import ( + FORMATS, + XLS_HEADERS, +) + + +class AccountMoveLineXlsx(models.AbstractModel): + _name = "report.account_move_line_report_xls.account_move_line_xlsx" + _inherit = "report.report_xlsx.abstract" + _description = "XLSX report for account move lines." + + def _get_ws_params(self, workbook, data, amls): + + # XLSX Template + col_specs = { + "move": { + "header": {"value": _("Entry")}, + "lines": {"value": self._render("line.move_id.name")}, + "width": 20, + }, + "name": { + "header": {"value": _("Name")}, + "lines": {"value": self._render("line.name")}, + "width": 42, + }, + "ref": { + "header": {"value": _("Reference")}, + "lines": {"value": self._render("line.ref")}, + "width": 42, + }, + "date": { + "header": {"value": _("Effective Date")}, + "lines": { + "value": self._render("line.date"), + "format": FORMATS["format_tcell_date_left"], + }, + "width": 13, + }, + "partner": { + "header": {"value": _("Partner")}, + "lines": { + "value": self._render("line.partner_id and line.partner_id.name") + }, + "width": 36, + }, + "partner_ref": { + "header": {"value": _("Partner Reference")}, + "lines": { + "value": self._render("line.partner_id and line.partner_id.ref") + }, + "width": 36, + }, + "account": { + "header": {"value": _("Account")}, + "lines": {"value": self._render("line.account_id.code")}, + "width": 12, + }, + "date_maturity": { + "header": {"value": _("Maturity Date")}, + "lines": { + "value": self._render("line.date_maturity"), + "format": FORMATS["format_tcell_date_left"], + }, + "width": 13, + }, + "debit": { + "header": { + "value": _("Debit"), + "format": FORMATS["format_theader_yellow_right"], + }, + "lines": { + "value": self._render("line.debit"), + "format": FORMATS["format_tcell_amount_right"], + }, + "totals": { + "type": "formula", + "value": self._render("debit_formula"), + "format": FORMATS["format_theader_yellow_amount_right"], + }, + "width": 18, + }, + "credit": { + "header": { + "value": _("Credit"), + "format": FORMATS["format_theader_yellow_right"], + }, + "lines": { + "value": self._render("line.credit"), + "format": FORMATS["format_tcell_amount_right"], + }, + "totals": { + "type": "formula", + "value": self._render("credit_formula"), + "format": FORMATS["format_theader_yellow_amount_right"], + }, + "width": 18, + }, + "balance": { + "header": { + "value": _("Balance"), + "format": FORMATS["format_theader_yellow_right"], + }, + "lines": { + "value": self._render("line.balance"), + "format": FORMATS["format_tcell_amount_right"], + }, + "totals": { + "type": "formula", + "value": self._render("bal_formula"), + "format": FORMATS["format_theader_yellow_amount_right"], + }, + "width": 18, + }, + "full_reconcile": { + "header": { + "value": _("Rec."), + "format": FORMATS["format_theader_yellow_center"], + }, + "lines": { + "value": self._render( + "line.full_reconcile_id " "and line.full_reconcile_id.name" + ), + "format": FORMATS["format_tcell_center"], + }, + "width": 12, + }, + "reconcile_amount": { + "header": {"value": _("Reconcile Amount")}, + "lines": { + "value": self._render( + "line.full_reconcile_id and line.balance or " + "(sum(line.matched_credit_ids.mapped('amount')) - " + "sum(line.matched_debit_ids.mapped('amount')))" + ), + "format": FORMATS["format_tcell_amount_right"], + }, + "width": 12, + }, + "matched_debit_ids": { + "header": {"value": _("Matched Debits")}, + "lines": { + "value": self._render( + "line.matched_debit_ids " + "and str([x.debit_move_id.id " + "for x in line.matched_debit_ids])" + ) + }, + "width": 20, + }, + "matched_credit_ids": { + "header": {"value": _("Matched Credits")}, + "lines": { + "value": self._render( + "line.matched_credit_ids " + "and str([x.credit_move_id.id " + "for x in line.matched_credit_ids])" + ) + }, + "width": 20, + }, + "amount_currency": { + "header": { + "value": _("Am. Currency"), + "format": FORMATS["format_theader_yellow_right"], + }, + "lines": { + "value": self._render("line.amount_currency"), + "format": FORMATS["format_tcell_amount_right"], + }, + "width": 18, + }, + "currency_name": { + "header": { + "value": _("Curr."), + "format": FORMATS["format_theader_yellow_center"], + }, + "lines": { + "value": self._render("line.currency_id and line.currency_id.name"), + "format": FORMATS["format_tcell_center"], + }, + "width": 6, + }, + "journal": { + "header": {"value": _("Journal")}, + "lines": {"value": self._render("line.journal_id.code")}, + "width": 12, + }, + "company_currency": { + "header": { + "value": _("Comp. Curr."), + "format": FORMATS["format_theader_yellow_center"], + }, + "lines": { + "value": self._render("line.company_id.currency_id.name"), + "format": FORMATS["format_tcell_center"], + }, + "width": 10, + }, + "product": { + "header": {"value": _("Product")}, + "lines": { + "value": self._render("line.product_id and line.product_id.name") + }, + "width": 36, + }, + "product_ref": { + "header": {"value": _("Product Reference")}, + "lines": { + "value": self._render( + "line.product_id and line.product_id.default_code " "or ''" + ) + }, + "width": 36, + }, + "product_uom": { + "header": {"value": _("Unit of Measure")}, + "lines": { + "value": self._render( + "line.product_uom_id and line.product_uom_id.name" + ) + }, + "width": 20, + }, + "quantity": { + "header": { + "value": _("Qty"), + "format": FORMATS["format_theader_yellow_right"], + }, + "lines": { + "value": self._render("line.quantity"), + "format": FORMATS["format_tcell_amount_right"], + }, + "width": 8, + }, + "statement": { + "header": {"value": _("Statement")}, + "lines": { + "value": self._render( + "line.statement_id and line.statement_id.name" + ) + }, + "width": 20, + }, + "invoice": { + "header": {"value": _("Invoice")}, + "lines": {"value": self._render("line.move_id and line.move_id.name")}, + "width": 20, + }, + "amount_residual": { + "header": { + "value": _("Residual Amount"), + "format": FORMATS["format_theader_yellow_right"], + }, + "lines": { + "value": self._render("line.amount_residual"), + "format": FORMATS["format_tcell_amount_right"], + }, + "width": 18, + }, + "amount_residual_currency": { + "header": { + "value": _("Res. Am. in Curr."), + "format": FORMATS["format_theader_yellow_right"], + }, + "lines": { + "value": self._render("line.amount_residual_currency"), + "format": FORMATS["format_tcell_amount_right"], + }, + "width": 18, + }, + "narration": { + "header": {"value": _("Notes")}, + "lines": {"value": self._render("line.move_id.narration or ''")}, + "width": 42, + }, + "blocked": { + "header": { + "value": _("Lit."), + "format": FORMATS["format_theader_yellow_center"], + }, + "lines": { + "value": self._render("line.blocked and 'x' or ''"), + "format": FORMATS["format_tcell_center"], + }, + "width": 4, + }, + "id": { + "header": { + "value": _("Id"), + "format": FORMATS["format_theader_yellow_right"], + }, + "lines": { + "value": self._render("line.id"), + "format": FORMATS["format_tcell_integer_right"], + }, + "width": 12, + }, + } + col_specs.update(self.env["account.move.line"]._report_xlsx_template()) + wanted_list = self.env["account.move.line"]._report_xlsx_fields() + title = _("Journal Items") + + return [ + { + "ws_name": title, + "generate_ws_method": "_amls_export", + "title": title, + "wanted_list": wanted_list, + "col_specs": col_specs, + } + ] + + def _amls_export(self, workbook, ws, ws_params, data, amls): + + ws.set_landscape() + ws.fit_to_pages(1, 0) + ws.set_header(XLS_HEADERS["xls_headers"]["standard"]) + ws.set_footer(XLS_HEADERS["xls_footers"]["standard"]) + + self._set_column_width(ws, ws_params) + + row_pos = 0 + row_pos = self._write_ws_title(ws, row_pos, ws_params) + + row_pos = self._write_line( + ws, + row_pos, + ws_params, + col_specs_section="header", + default_format=FORMATS["format_theader_yellow_left"], + ) + + ws.freeze_panes(row_pos, 0) + + wanted_list = ws_params["wanted_list"] + debit_pos = "debit" in wanted_list and wanted_list.index("debit") + credit_pos = "credit" in wanted_list and wanted_list.index("credit") + + for line in amls: + row_pos = self._write_line( + ws, + row_pos, + ws_params, + col_specs_section="lines", + render_space={"line": line}, + default_format=FORMATS["format_tcell_left"], + ) + + aml_cnt = len(amls) + debit_start = self._rowcol_to_cell(row_pos - aml_cnt, debit_pos) + debit_stop = self._rowcol_to_cell(row_pos - 1, debit_pos) + debit_formula = "SUM({}:{})".format(debit_start, debit_stop) + credit_start = self._rowcol_to_cell(row_pos - aml_cnt, credit_pos) + credit_stop = self._rowcol_to_cell(row_pos - 1, credit_pos) + credit_formula = "SUM({}:{})".format(credit_start, credit_stop) + debit_cell = self._rowcol_to_cell(row_pos, debit_pos) + credit_cell = self._rowcol_to_cell(row_pos, credit_pos) + bal_formula = debit_cell + "-" + credit_cell + row_pos = self._write_line( + ws, + row_pos, + ws_params, + col_specs_section="totals", + render_space={ + "debit_formula": debit_formula, + "credit_formula": credit_formula, + "bal_formula": bal_formula, + }, + default_format=FORMATS["format_theader_yellow_left"], + ) diff --git a/account_move_line_report_xls/report/account_move_line_xlsx.xml b/account_move_line_report_xls/report/account_move_line_xlsx.xml new file mode 100644 index 000000000000..5bb04f8064d9 --- /dev/null +++ b/account_move_line_report_xls/report/account_move_line_xlsx.xml @@ -0,0 +1,15 @@ + + + + Export Selected Lines + account.move.line + ir.actions.report + action + + account_move_line_report_xls.account_move_line_xlsx + account_move_line + xlsx + + diff --git a/account_move_line_report_xls/static/description/icon.png b/account_move_line_report_xls/static/description/icon.png new file mode 100644 index 000000000000..3a0328b516c4 Binary files /dev/null and b/account_move_line_report_xls/static/description/icon.png differ diff --git a/account_move_line_report_xls/static/description/icon.svg b/account_move_line_report_xls/static/description/icon.svg new file mode 100644 index 000000000000..a7a26d0932ab --- /dev/null +++ b/account_move_line_report_xls/static/description/icon.svg @@ -0,0 +1,79 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/account_move_line_report_xls/static/description/index.html b/account_move_line_report_xls/static/description/index.html new file mode 100644 index 000000000000..697513e1671f --- /dev/null +++ b/account_move_line_report_xls/static/description/index.html @@ -0,0 +1,459 @@ + + + + + +Account Move Line XLSX export + + + +
+

Account Move Line XLSX export

+ + +

Beta License: AGPL-3 OCA/account-financial-reporting Translate me on Weblate Try me on Runboat

+

This module extends the functionality of the journal items +(‘account.move.line’) list view and allow you to export the selected lines.

+

Table of contents

+ +
+

Usage

+

To use this module, you need to:

+
    +
  • go to the list view of the journal items
  • +
  • select the lines you wish to export
  • +
  • click on the button on top to export
  • +
+

The Excel export can be tailored to your exact needs via the following methods +of the ‘account.move.line’ object:

+
    +
  • _report_xlsx_fields

    +

    Add/drop columns or change order from the list of columns that are defined +in the Excel template.

    +

    The following fields are defined in the Excel template:

    +
    +

    move, name, date, journal, period, partner, account, +date_maturity, debit, credit, balance, +reconcile, reconcile_partial, analytic_account, +ref, partner_ref, tax_code, tax_amount, amount_residual, +amount_currency, currency_name, company_currency, +amount_residual_currency, product, product_ref’, product_uom, quantity, +statement, invoice, narration, blocked

    +
    +
  • +
  • _report_xlsx_template

    +

    Change/extend the Excel template.

    +
  • +
+
+
+

Known issues / Roadmap

+
    +
  • Add support for the analytic_distribution field
  • +
+
+
+

Bug Tracker

+

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 +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Noviat
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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/account-financial-reporting project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/account_move_line_report_xls/tests/__init__.py b/account_move_line_report_xls/tests/__init__.py new file mode 100644 index 000000000000..f16267698eb3 --- /dev/null +++ b/account_move_line_report_xls/tests/__init__.py @@ -0,0 +1 @@ +from . import test_aml_report_xlsx diff --git a/account_move_line_report_xls/tests/test_aml_report_xlsx.py b/account_move_line_report_xls/tests/test_aml_report_xlsx.py new file mode 100644 index 000000000000..51418f32624d --- /dev/null +++ b/account_move_line_report_xls/tests/test_aml_report_xlsx.py @@ -0,0 +1,33 @@ +# Copyright 2009-2020 Noviat. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo.tests.common import TransactionCase + + +class TestAmlReportXlsx(TransactionCase): + def setUp(self): + super(TestAmlReportXlsx, self).setUp() + self.report_ref = "account_move_line_report_xls.action_account_move_line_xlsx" + self.report = self.env.ref( + "account_move_line_report_xls.action_account_move_line_xlsx" + ) + sale_journal = self.env["account.journal"].search([("type", "=", "sale")])[0] + ar = self.env["account.account"].search( + [("account_type", "=", "asset_receivable")] + )[0] + aml_vals = [ + {"name": "debit", "debit": 100, "account_id": ar.id}, + {"name": "credit", "credit": 100, "account_id": ar.id}, + ] + am = self.env["account.move"].create( + { + "name": "test", + "journal_id": sale_journal.id, + "line_ids": [(0, 0, x) for x in aml_vals], + } + ) + self.amls = am.line_ids + + def test_aml_report_xlsx(self): + report_xls = self.report._render_xlsx(self.report_ref, self.amls.ids, None) + self.assertEqual(report_xls[1], "xlsx") diff --git a/setup/account_move_line_report_xls/odoo/addons/account_move_line_report_xls b/setup/account_move_line_report_xls/odoo/addons/account_move_line_report_xls new file mode 120000 index 000000000000..726670322b03 --- /dev/null +++ b/setup/account_move_line_report_xls/odoo/addons/account_move_line_report_xls @@ -0,0 +1 @@ +../../../../account_move_line_report_xls \ No newline at end of file diff --git a/setup/account_move_line_report_xls/setup.py b/setup/account_move_line_report_xls/setup.py new file mode 100644 index 000000000000..28c57bb64031 --- /dev/null +++ b/setup/account_move_line_report_xls/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)