diff --git a/report_xlsx/README.rst b/report_xlsx/README.rst new file mode 100644 index 000000000..1934a7f33 --- /dev/null +++ b/report_xlsx/README.rst @@ -0,0 +1,127 @@ +================ +Base report xlsx +================ + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/13.0/report_xlsx + :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-13-0/reporting-engine-13-0-report_xlsx + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/143/13.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module provides a basic report class to generate xlsx report. + +**Table of contents** + +.. contents:: + :local: + +Installation +============ + +Make sure you have ``xlsxwriter`` Python module installed:: + +$ pip3 install xlsxwriter + +For testing it is also necessary ``xlrd`` Python module installed:: + +$ pip3 install xlrd + +Usage +===== + +An example of XLSX report for partners on a module called `module_name`: + +A python class :: + + from odoo import models + + class PartnerXlsx(models.AbstractModel): + _name = 'report.module_name.report_name' + _inherit = 'report.report_xlsx.abstract' + + def generate_xlsx_report(self, workbook, data, partners): + for obj in partners: + report_name = obj.name + # One sheet by partner + sheet = workbook.add_worksheet(report_name[:31]) + bold = workbook.add_format({'bold': True}) + sheet.write(0, 0, obj.name, bold) + +To manipulate the ``workbook`` and ``sheet`` objects, refer to the +`documentation `_ of ``xlsxwriter``. + +A report XML record :: + + + +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 smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* ACSONE SA/NV +* Creu Blanca + +Contributors +~~~~~~~~~~~~ + +* Adrien Peiffer +* Sébastien Alix +* Stéphane Bidoul +* Enric Tobella +* Graeme Gellatly +* Cristian Salamea +* Rod Schouteden + +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 `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/report_xlsx/__init__.py b/report_xlsx/__init__.py new file mode 100644 index 000000000..2a4823f86 --- /dev/null +++ b/report_xlsx/__init__.py @@ -0,0 +1,5 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from . import controllers +from . import models +from . import report diff --git a/report_xlsx/__manifest__.py b/report_xlsx/__manifest__.py new file mode 100644 index 000000000..d5b03397d --- /dev/null +++ b/report_xlsx/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright 2015 ACSONE SA/NV () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +{ + "name": "Base report xlsx", + "summary": "Base module to create xlsx report", + "author": "ACSONE SA/NV," "Creu Blanca," "Odoo Community Association (OCA)", + "website": "https://github.com/oca/reporting-engine", + "category": "Reporting", + "version": "13.0.1.0.0", + "license": "AGPL-3", + "external_dependencies": {"python": ["xlsxwriter", "xlrd"]}, + "depends": ["base", "web"], + "data": ["views/webclient_templates.xml"], + "demo": ["demo/report.xml"], + "installable": True, +} diff --git a/report_xlsx/controllers/__init__.py b/report_xlsx/controllers/__init__.py new file mode 100644 index 000000000..12a7e529b --- /dev/null +++ b/report_xlsx/controllers/__init__.py @@ -0,0 +1 @@ +from . import main diff --git a/report_xlsx/controllers/main.py b/report_xlsx/controllers/main.py new file mode 100644 index 000000000..9436da375 --- /dev/null +++ b/report_xlsx/controllers/main.py @@ -0,0 +1,50 @@ +# Copyright (C) 2017 Creu Blanca +# License AGPL-3.0 or later (https://www.gnuorg/licenses/agpl.html). + +import json +import time + +from odoo.http import content_disposition, request, route +from odoo.tools.safe_eval import safe_eval + +from odoo.addons.web.controllers import main as report + + +class ReportController(report.ReportController): + @route() + def report_routes(self, reportname, docids=None, converter=None, **data): + if converter == "xlsx": + report = request.env["ir.actions.report"]._get_report_from_name(reportname) + context = dict(request.env.context) + if docids: + docids = [int(i) for i in docids.split(",")] + if data.get("options"): + data.update(json.loads(data.pop("options"))) + if data.get("context"): + # Ignore 'lang' here, because the context in data is the one + # from the webclient *but* if the user explicitely wants to + # change the lang, this mechanism overwrites it. + data["context"] = json.loads(data["context"]) + if data["context"].get("lang"): + del data["context"]["lang"] + context.update(data["context"]) + xlsx = report.with_context(context).render_xlsx(docids, data=data)[0] + report_name = report.report_file + if report.print_report_name and not len(docids) > 1: + obj = request.env[report.model].browse(docids[0]) + report_name = safe_eval( + report.print_report_name, {"object": obj, "time": time} + ) + xlsxhttpheaders = [ + ( + "Content-Type", + "application/vnd.openxmlformats-" + "officedocument.spreadsheetml.sheet", + ), + ("Content-Length", len(xlsx)), + ("Content-Disposition", content_disposition(report_name + ".xlsx")), + ] + return request.make_response(xlsx, headers=xlsxhttpheaders) + return super(ReportController, self).report_routes( + reportname, docids, converter, **data + ) diff --git a/report_xlsx/demo/report.xml b/report_xlsx/demo/report.xml new file mode 100644 index 000000000..9f82fbf8c --- /dev/null +++ b/report_xlsx/demo/report.xml @@ -0,0 +1,16 @@ + + + + + diff --git a/report_xlsx/i18n/de.po b/report_xlsx/i18n/de.po new file mode 100644 index 000000000..b312b54b1 --- /dev/null +++ b/report_xlsx/i18n/de.po @@ -0,0 +1,130 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * report_xlsx +# +# Translators: +# Ricardo Gross , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-23 03:49+0000\n" +"PO-Revision-Date: 2019-07-12 12:43+0000\n" +"Last-Translator: Maria Sparenberg \n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"Language: de\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 3.7.1\n" + +#. module: report_xlsx +#: code:addons/report_xlsx/models/ir_report.py:18 +#, python-format +msgid "%s model was not found" +msgstr "%s Modell wurde nicht gefunden" + +#. module: report_xlsx +#. openerp-web +#: code:addons/report_xlsx/static/src/js/report/action_manager_report.js:49 +#, python-format +msgid "" +"A popup window with your report was blocked. You may need to change your " +"browser settings to allow popup windows for this page." +msgstr "" +"Ein Popup-Fenster wurde abgewiesen. Sie werden vermutlich Ihre Browser-" +"Einstellungen ändern müssen, damit die Anzeige dieser Seite möglich wird." + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_report_report_xlsx_abstract +msgid "Abstract XLSX Report" +msgstr "Abstrakter XLSX-Bericht" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract__display_name +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx__display_name +msgid "Display Name" +msgstr "Name anzeigen" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "HTML" +msgstr "HTML" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract__id +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx__id +msgid "ID" +msgstr "ID" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract____last_update +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx____last_update +msgid "Last Modified on" +msgstr "Zuletzt geändert am" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "PDF" +msgstr "PDF" + +#. module: report_xlsx +#: model:ir.actions.report,name:report_xlsx.partner_xlsx +msgid "Print to XLSX" +msgstr "Drucke nach XLSX" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "Py3o" +msgstr "Py3o" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_ir_actions_report +msgid "Report Action" +msgstr "Berichtsaktion" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_ir_actions_report__report_type +msgid "Report Type" +msgstr "Berichtsart" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "Text" +msgstr "Text" + +#. module: report_xlsx +#: model:ir.model.fields,help:report_xlsx.field_ir_actions_report__report_type +msgid "" +"The type of the report that will be rendered, each one having its own " +"rendering method. HTML means the report will be opened directly in your " +"browser PDF means the report will be rendered using Wkhtmltopdf and " +"downloaded by the user." +msgstr "" +"Die Art des Berichts, der erstellt wird, jeder mit eigener Darstellungsform. " +"HTML bedeutet, dass der Bericht unmittelbar in Ihrem Browser dargestellt " +"wird, PDF bedeutet, dass der Bericht mittels Wkhtmltopdf gewandelt wird und " +"vom Anwender heruntergeladen wird." + +#. module: report_xlsx +#. openerp-web +#: code:addons/report_xlsx/static/src/js/report/action_manager_report.js:52 +#, python-format +msgid "Warning" +msgstr "Hinweis" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "XLSX" +msgstr "XLSX" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "XML" +msgstr "XML" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_report_report_xlsx_partner_xlsx +msgid "report.report_xlsx.partner_xlsx" +msgstr "report.report_xlsx.partner_xlsx" diff --git a/report_xlsx/i18n/es.po b/report_xlsx/i18n/es.po new file mode 100644 index 000000000..14453f99b --- /dev/null +++ b/report_xlsx/i18n/es.po @@ -0,0 +1,127 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * report_xlsx +# +# Translators: +# Pedro M. Baeza , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-01 20:11+0000\n" +"PO-Revision-Date: 2016-11-01 20:11+0000\n" +"Last-Translator: Pedro M. Baeza , 2016\n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\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" + +#. module: report_xlsx +#: code:addons/report_xlsx/models/ir_report.py:18 +#, python-format +msgid "%s model was not found" +msgstr "" + +#. module: report_xlsx +#. openerp-web +#: code:addons/report_xlsx/static/src/js/report/action_manager_report.js:49 +#, python-format +msgid "" +"A popup window with your report was blocked. You may need to change your " +"browser settings to allow popup windows for this page." +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_report_report_xlsx_abstract +msgid "Abstract XLSX Report" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract__display_name +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx__display_name +msgid "Display Name" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "HTML" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract__id +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx__id +msgid "ID" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract____last_update +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx____last_update +msgid "Last Modified on" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "PDF" +msgstr "" + +#. module: report_xlsx +#: model:ir.actions.report,name:report_xlsx.partner_xlsx +msgid "Print to XLSX" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "Py3o" +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_ir_actions_report +msgid "Report Action" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_ir_actions_report__report_type +msgid "Report Type" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "Text" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,help:report_xlsx.field_ir_actions_report__report_type +msgid "" +"The type of the report that will be rendered, each one having its own " +"rendering method. HTML means the report will be opened directly in your " +"browser PDF means the report will be rendered using Wkhtmltopdf and " +"downloaded by the user." +msgstr "" + +#. module: report_xlsx +#. openerp-web +#: code:addons/report_xlsx/static/src/js/report/action_manager_report.js:52 +#, python-format +msgid "Warning" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "XLSX" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "XML" +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_report_report_xlsx_partner_xlsx +msgid "report.report_xlsx.partner_xlsx" +msgstr "" + +#, fuzzy +#~ msgid "ir.actions.report" +#~ msgstr "ir.actions.report.xml" diff --git a/report_xlsx/i18n/fr.po b/report_xlsx/i18n/fr.po new file mode 100644 index 000000000..2fd9a0d38 --- /dev/null +++ b/report_xlsx/i18n/fr.po @@ -0,0 +1,129 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * report_xlsx +# +# Translators: +# Nicolas JEUDY , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-05 17:53+0000\n" +"PO-Revision-Date: 2018-01-05 17:53+0000\n" +"Last-Translator: Nicolas JEUDY , 2018\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: fr\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" + +#. module: report_xlsx +#: code:addons/report_xlsx/models/ir_report.py:18 +#, python-format +msgid "%s model was not found" +msgstr "model '%s' n'a pas été trouvé" + +#. module: report_xlsx +#. openerp-web +#: code:addons/report_xlsx/static/src/js/report/action_manager_report.js:49 +#, python-format +msgid "" +"A popup window with your report was blocked. You may need to change your " +"browser settings to allow popup windows for this page." +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_report_report_xlsx_abstract +msgid "Abstract XLSX Report" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract__display_name +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx__display_name +msgid "Display Name" +msgstr "Nom" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "HTML" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract__id +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx__id +msgid "ID" +msgstr "ID" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract____last_update +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx____last_update +msgid "Last Modified on" +msgstr "Dernière modification le" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "PDF" +msgstr "" + +#. module: report_xlsx +#: model:ir.actions.report,name:report_xlsx.partner_xlsx +msgid "Print to XLSX" +msgstr "Imprimer en XLSX" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "Py3o" +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_ir_actions_report +msgid "Report Action" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_ir_actions_report__report_type +msgid "Report Type" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "Text" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,help:report_xlsx.field_ir_actions_report__report_type +msgid "" +"The type of the report that will be rendered, each one having its own " +"rendering method. HTML means the report will be opened directly in your " +"browser PDF means the report will be rendered using Wkhtmltopdf and " +"downloaded by the user." +msgstr "" + +#. module: report_xlsx +#. openerp-web +#: code:addons/report_xlsx/static/src/js/report/action_manager_report.js:52 +#, python-format +msgid "Warning" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "XLSX" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "XML" +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_report_report_xlsx_partner_xlsx +msgid "report.report_xlsx.partner_xlsx" +msgstr "report.report_xlsx.partner_xlsx" + +#~ msgid "ir.actions.report" +#~ msgstr "ir.actions.report" + +#~ msgid "report.report_xlsx.abstract" +#~ msgstr "report.report_xlsx.abstract" diff --git a/report_xlsx/i18n/hr.po b/report_xlsx/i18n/hr.po new file mode 100644 index 000000000..d9fc9a562 --- /dev/null +++ b/report_xlsx/i18n/hr.po @@ -0,0 +1,128 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * report_xlsx +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-31 03:52+0000\n" +"PO-Revision-Date: 2017-05-31 03:52+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: report_xlsx +#: code:addons/report_xlsx/models/ir_report.py:18 +#, python-format +msgid "%s model was not found" +msgstr "" + +#. module: report_xlsx +#. openerp-web +#: code:addons/report_xlsx/static/src/js/report/action_manager_report.js:49 +#, python-format +msgid "" +"A popup window with your report was blocked. You may need to change your " +"browser settings to allow popup windows for this page." +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_report_report_xlsx_abstract +msgid "Abstract XLSX Report" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract__display_name +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx__display_name +msgid "Display Name" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "HTML" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract__id +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx__id +msgid "ID" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract____last_update +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx____last_update +msgid "Last Modified on" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "PDF" +msgstr "" + +#. module: report_xlsx +#: model:ir.actions.report,name:report_xlsx.partner_xlsx +msgid "Print to XLSX" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "Py3o" +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_ir_actions_report +msgid "Report Action" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_ir_actions_report__report_type +msgid "Report Type" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "Text" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,help:report_xlsx.field_ir_actions_report__report_type +msgid "" +"The type of the report that will be rendered, each one having its own " +"rendering method. HTML means the report will be opened directly in your " +"browser PDF means the report will be rendered using Wkhtmltopdf and " +"downloaded by the user." +msgstr "" + +#. module: report_xlsx +#. openerp-web +#: code:addons/report_xlsx/static/src/js/report/action_manager_report.js:52 +#, python-format +msgid "Warning" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "XLSX" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "XML" +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_report_report_xlsx_partner_xlsx +msgid "report.report_xlsx.partner_xlsx" +msgstr "" + +#, fuzzy +#~ msgid "ir.actions.report" +#~ msgstr "ir.actions.report.xml" diff --git a/report_xlsx/i18n/hr_HR.po b/report_xlsx/i18n/hr_HR.po new file mode 100644 index 000000000..9502718d4 --- /dev/null +++ b/report_xlsx/i18n/hr_HR.po @@ -0,0 +1,129 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * report_xlsx +# +# Translators: +# Bole , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-01 20:11+0000\n" +"PO-Revision-Date: 2016-11-01 20:11+0000\n" +"Last-Translator: Bole , 2016\n" +"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/" +"hr_HR/)\n" +"Language: hr_HR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: report_xlsx +#: code:addons/report_xlsx/models/ir_report.py:18 +#, python-format +msgid "%s model was not found" +msgstr "" + +#. module: report_xlsx +#. openerp-web +#: code:addons/report_xlsx/static/src/js/report/action_manager_report.js:49 +#, python-format +msgid "" +"A popup window with your report was blocked. You may need to change your " +"browser settings to allow popup windows for this page." +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_report_report_xlsx_abstract +msgid "Abstract XLSX Report" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract__display_name +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx__display_name +msgid "Display Name" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "HTML" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract__id +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx__id +msgid "ID" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract____last_update +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx____last_update +msgid "Last Modified on" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "PDF" +msgstr "" + +#. module: report_xlsx +#: model:ir.actions.report,name:report_xlsx.partner_xlsx +msgid "Print to XLSX" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "Py3o" +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_ir_actions_report +msgid "Report Action" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_ir_actions_report__report_type +msgid "Report Type" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "Text" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,help:report_xlsx.field_ir_actions_report__report_type +msgid "" +"The type of the report that will be rendered, each one having its own " +"rendering method. HTML means the report will be opened directly in your " +"browser PDF means the report will be rendered using Wkhtmltopdf and " +"downloaded by the user." +msgstr "" + +#. module: report_xlsx +#. openerp-web +#: code:addons/report_xlsx/static/src/js/report/action_manager_report.js:52 +#, python-format +msgid "Warning" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "XLSX" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "XML" +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_report_report_xlsx_partner_xlsx +msgid "report.report_xlsx.partner_xlsx" +msgstr "" + +#, fuzzy +#~ msgid "ir.actions.report" +#~ msgstr "ir.actions.report.xml" diff --git a/report_xlsx/i18n/it.po b/report_xlsx/i18n/it.po new file mode 100644 index 000000000..f25e1d805 --- /dev/null +++ b/report_xlsx/i18n/it.po @@ -0,0 +1,127 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * report_xlsx +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-31 03:52+0000\n" +"PO-Revision-Date: 2017-05-31 03:52+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" +"Language: it\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" + +#. module: report_xlsx +#: code:addons/report_xlsx/models/ir_report.py:18 +#, python-format +msgid "%s model was not found" +msgstr "" + +#. module: report_xlsx +#. openerp-web +#: code:addons/report_xlsx/static/src/js/report/action_manager_report.js:49 +#, python-format +msgid "" +"A popup window with your report was blocked. You may need to change your " +"browser settings to allow popup windows for this page." +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_report_report_xlsx_abstract +msgid "Abstract XLSX Report" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract__display_name +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx__display_name +msgid "Display Name" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "HTML" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract__id +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx__id +msgid "ID" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract____last_update +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx____last_update +msgid "Last Modified on" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "PDF" +msgstr "" + +#. module: report_xlsx +#: model:ir.actions.report,name:report_xlsx.partner_xlsx +msgid "Print to XLSX" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "Py3o" +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_ir_actions_report +msgid "Report Action" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_ir_actions_report__report_type +msgid "Report Type" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "Text" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,help:report_xlsx.field_ir_actions_report__report_type +msgid "" +"The type of the report that will be rendered, each one having its own " +"rendering method. HTML means the report will be opened directly in your " +"browser PDF means the report will be rendered using Wkhtmltopdf and " +"downloaded by the user." +msgstr "" + +#. module: report_xlsx +#. openerp-web +#: code:addons/report_xlsx/static/src/js/report/action_manager_report.js:52 +#, python-format +msgid "Warning" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "XLSX" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "XML" +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_report_report_xlsx_partner_xlsx +msgid "report.report_xlsx.partner_xlsx" +msgstr "" + +#, fuzzy +#~ msgid "ir.actions.report" +#~ msgstr "ir.actions.report.xml" diff --git a/report_xlsx/i18n/nl_NL.po b/report_xlsx/i18n/nl_NL.po new file mode 100644 index 000000000..59ecc9f70 --- /dev/null +++ b/report_xlsx/i18n/nl_NL.po @@ -0,0 +1,128 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * report_xlsx +# +# Translators: +# Peter Hageman , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-23 00:28+0000\n" +"PO-Revision-Date: 2017-06-23 00:28+0000\n" +"Last-Translator: Peter Hageman , 2017\n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/" +"teams/23907/nl_NL/)\n" +"Language: nl_NL\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" + +#. module: report_xlsx +#: code:addons/report_xlsx/models/ir_report.py:18 +#, python-format +msgid "%s model was not found" +msgstr "" + +#. module: report_xlsx +#. openerp-web +#: code:addons/report_xlsx/static/src/js/report/action_manager_report.js:49 +#, python-format +msgid "" +"A popup window with your report was blocked. You may need to change your " +"browser settings to allow popup windows for this page." +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_report_report_xlsx_abstract +msgid "Abstract XLSX Report" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract__display_name +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx__display_name +msgid "Display Name" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "HTML" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract__id +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx__id +msgid "ID" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract____last_update +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx____last_update +msgid "Last Modified on" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "PDF" +msgstr "" + +#. module: report_xlsx +#: model:ir.actions.report,name:report_xlsx.partner_xlsx +msgid "Print to XLSX" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "Py3o" +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_ir_actions_report +msgid "Report Action" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_ir_actions_report__report_type +msgid "Report Type" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "Text" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,help:report_xlsx.field_ir_actions_report__report_type +msgid "" +"The type of the report that will be rendered, each one having its own " +"rendering method. HTML means the report will be opened directly in your " +"browser PDF means the report will be rendered using Wkhtmltopdf and " +"downloaded by the user." +msgstr "" + +#. module: report_xlsx +#. openerp-web +#: code:addons/report_xlsx/static/src/js/report/action_manager_report.js:52 +#, python-format +msgid "Warning" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "XLSX" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "XML" +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_report_report_xlsx_partner_xlsx +msgid "report.report_xlsx.partner_xlsx" +msgstr "" + +#, fuzzy +#~ msgid "ir.actions.report" +#~ msgstr "ir.actions.report.xml" diff --git a/report_xlsx/i18n/pt.po b/report_xlsx/i18n/pt.po new file mode 100644 index 000000000..f9385e7dc --- /dev/null +++ b/report_xlsx/i18n/pt.po @@ -0,0 +1,121 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * report_xlsx +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-08-14 13:44+0000\n" +"Last-Translator: Pedro Castro Silva \n" +"Language-Team: none\n" +"Language: pt\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 3.7.1\n" + +#. module: report_xlsx +#: code:addons/report_xlsx/models/ir_report.py:18 +#, python-format +msgid "%s model was not found" +msgstr "O modelo %s não foi encontrado" + +#. module: report_xlsx +#. openerp-web +#: code:addons/report_xlsx/static/src/js/report/action_manager_report.js:49 +#, python-format +msgid "A popup window with your report was blocked. You may need to change your browser settings to allow popup windows for this page." +msgstr "" +"Uma janela popup com o seu relatório foi bloqueada. Pode necessitar de mudar " +"as configurações do browser para permitir janelas popup nesta página." + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_report_report_xlsx_abstract +msgid "Abstract XLSX Report" +msgstr "Relatório XLSX Abstrato" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract__display_name +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx__display_name +msgid "Display Name" +msgstr "Nome a Exibir" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "HTML" +msgstr "HTML" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract__id +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx__id +msgid "ID" +msgstr "ID" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract____last_update +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx____last_update +msgid "Last Modified on" +msgstr "Última Modificação em" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "PDF" +msgstr "PDF" + +#. module: report_xlsx +#: model:ir.actions.report,name:report_xlsx.partner_xlsx +msgid "Print to XLSX" +msgstr "Imprimir para XLSX" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "Py3o" +msgstr "Py3o" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_ir_actions_report +msgid "Report Action" +msgstr "Ação do Relatório" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_ir_actions_report__report_type +msgid "Report Type" +msgstr "Tipo de Relatório" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "Text" +msgstr "Texto" + +#. module: report_xlsx +#: model:ir.model.fields,help:report_xlsx.field_ir_actions_report__report_type +msgid "The type of the report that will be rendered, each one having its own rendering method. HTML means the report will be opened directly in your browser PDF means the report will be rendered using Wkhtmltopdf and downloaded by the user." +msgstr "" +"O tipo de relatório que será produzido, tendo cada qual o seu método de " +"produção. HTML significa que o relatório será aberto diretamente no seu " +"browser. PDF indica que o relatório será produzido com o Wkhtmltopdf e " +"descarregado pelo utilizador." + +#. module: report_xlsx +#. openerp-web +#: code:addons/report_xlsx/static/src/js/report/action_manager_report.js:52 +#, python-format +msgid "Warning" +msgstr "Aviso" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "XLSX" +msgstr "XLSX" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "XML" +msgstr "XML" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_report_report_xlsx_partner_xlsx +msgid "report.report_xlsx.partner_xlsx" +msgstr "" diff --git a/report_xlsx/i18n/pt_PT.po b/report_xlsx/i18n/pt_PT.po new file mode 100644 index 000000000..9247c1f3d --- /dev/null +++ b/report_xlsx/i18n/pt_PT.po @@ -0,0 +1,128 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * report_xlsx +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-31 03:52+0000\n" +"PO-Revision-Date: 2017-05-31 03:52+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Portuguese (Portugal) (https://www.transifex.com/oca/" +"teams/23907/pt_PT/)\n" +"Language: pt_PT\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" + +#. module: report_xlsx +#: code:addons/report_xlsx/models/ir_report.py:18 +#, python-format +msgid "%s model was not found" +msgstr "" + +#. module: report_xlsx +#. openerp-web +#: code:addons/report_xlsx/static/src/js/report/action_manager_report.js:49 +#, python-format +msgid "" +"A popup window with your report was blocked. You may need to change your " +"browser settings to allow popup windows for this page." +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_report_report_xlsx_abstract +msgid "Abstract XLSX Report" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract__display_name +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx__display_name +msgid "Display Name" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "HTML" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract__id +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx__id +msgid "ID" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract____last_update +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx____last_update +msgid "Last Modified on" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "PDF" +msgstr "" + +#. module: report_xlsx +#: model:ir.actions.report,name:report_xlsx.partner_xlsx +msgid "Print to XLSX" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "Py3o" +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_ir_actions_report +msgid "Report Action" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_ir_actions_report__report_type +msgid "Report Type" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "Text" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,help:report_xlsx.field_ir_actions_report__report_type +msgid "" +"The type of the report that will be rendered, each one having its own " +"rendering method. HTML means the report will be opened directly in your " +"browser PDF means the report will be rendered using Wkhtmltopdf and " +"downloaded by the user." +msgstr "" + +#. module: report_xlsx +#. openerp-web +#: code:addons/report_xlsx/static/src/js/report/action_manager_report.js:52 +#, python-format +msgid "Warning" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "XLSX" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "XML" +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_report_report_xlsx_partner_xlsx +msgid "report.report_xlsx.partner_xlsx" +msgstr "" + +#, fuzzy +#~ msgid "ir.actions.report" +#~ msgstr "ir.actions.report.xml" diff --git a/report_xlsx/i18n/report_xlsx.pot b/report_xlsx/i18n/report_xlsx.pot new file mode 100644 index 000000000..84a3b951f --- /dev/null +++ b/report_xlsx/i18n/report_xlsx.pot @@ -0,0 +1,113 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * report_xlsx +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.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: report_xlsx +#: code:addons/report_xlsx/models/ir_report.py:18 +#, python-format +msgid "%s model was not found" +msgstr "" + +#. module: report_xlsx +#. openerp-web +#: code:addons/report_xlsx/static/src/js/report/action_manager_report.js:49 +#, python-format +msgid "A popup window with your report was blocked. You may need to change your browser settings to allow popup windows for this page." +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_report_report_xlsx_abstract +msgid "Abstract XLSX Report" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract__display_name +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx__display_name +msgid "Display Name" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "HTML" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract__id +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx__id +msgid "ID" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract____last_update +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx____last_update +msgid "Last Modified on" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "PDF" +msgstr "" + +#. module: report_xlsx +#: model:ir.actions.report,name:report_xlsx.partner_xlsx +msgid "Print to XLSX" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "Py3o" +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_ir_actions_report +msgid "Report Action" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_ir_actions_report__report_type +msgid "Report Type" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "Text" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,help:report_xlsx.field_ir_actions_report__report_type +msgid "The type of the report that will be rendered, each one having its own rendering method. HTML means the report will be opened directly in your browser PDF means the report will be rendered using Wkhtmltopdf and downloaded by the user." +msgstr "" + +#. module: report_xlsx +#. openerp-web +#: code:addons/report_xlsx/static/src/js/report/action_manager_report.js:52 +#, python-format +msgid "Warning" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "XLSX" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "XML" +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_report_report_xlsx_partner_xlsx +msgid "report.report_xlsx.partner_xlsx" +msgstr "" + diff --git a/report_xlsx/i18n/tr.po b/report_xlsx/i18n/tr.po new file mode 100644 index 000000000..6e2b77aa5 --- /dev/null +++ b/report_xlsx/i18n/tr.po @@ -0,0 +1,127 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * report_xlsx +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-31 03:52+0000\n" +"PO-Revision-Date: 2017-05-31 03:52+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Turkish (https://www.transifex.com/oca/teams/23907/tr/)\n" +"Language: tr\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" + +#. module: report_xlsx +#: code:addons/report_xlsx/models/ir_report.py:18 +#, python-format +msgid "%s model was not found" +msgstr "" + +#. module: report_xlsx +#. openerp-web +#: code:addons/report_xlsx/static/src/js/report/action_manager_report.js:49 +#, python-format +msgid "" +"A popup window with your report was blocked. You may need to change your " +"browser settings to allow popup windows for this page." +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_report_report_xlsx_abstract +msgid "Abstract XLSX Report" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract__display_name +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx__display_name +msgid "Display Name" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "HTML" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract__id +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx__id +msgid "ID" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_abstract____last_update +#: model:ir.model.fields,field_description:report_xlsx.field_report_report_xlsx_partner_xlsx____last_update +msgid "Last Modified on" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "PDF" +msgstr "" + +#. module: report_xlsx +#: model:ir.actions.report,name:report_xlsx.partner_xlsx +msgid "Print to XLSX" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "Py3o" +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_ir_actions_report +msgid "Report Action" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,field_description:report_xlsx.field_ir_actions_report__report_type +msgid "Report Type" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "Text" +msgstr "" + +#. module: report_xlsx +#: model:ir.model.fields,help:report_xlsx.field_ir_actions_report__report_type +msgid "" +"The type of the report that will be rendered, each one having its own " +"rendering method. HTML means the report will be opened directly in your " +"browser PDF means the report will be rendered using Wkhtmltopdf and " +"downloaded by the user." +msgstr "" + +#. module: report_xlsx +#. openerp-web +#: code:addons/report_xlsx/static/src/js/report/action_manager_report.js:52 +#, python-format +msgid "Warning" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "XLSX" +msgstr "" + +#. module: report_xlsx +#: selection:ir.actions.report,report_type:0 +msgid "XML" +msgstr "" + +#. module: report_xlsx +#: model:ir.model,name:report_xlsx.model_report_report_xlsx_partner_xlsx +msgid "report.report_xlsx.partner_xlsx" +msgstr "" + +#, fuzzy +#~ msgid "ir.actions.report" +#~ msgstr "ir.actions.report.xml" diff --git a/report_xlsx/models/__init__.py b/report_xlsx/models/__init__.py new file mode 100644 index 000000000..54dbf3df6 --- /dev/null +++ b/report_xlsx/models/__init__.py @@ -0,0 +1 @@ +from . import ir_report diff --git a/report_xlsx/models/ir_report.py b/report_xlsx/models/ir_report.py new file mode 100644 index 000000000..3f5db2fb7 --- /dev/null +++ b/report_xlsx/models/ir_report.py @@ -0,0 +1,37 @@ +# Copyright 2015 ACSONE SA/NV () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import _, api, fields, models +from odoo.exceptions import UserError + + +class ReportAction(models.Model): + _inherit = "ir.actions.report" + + report_type = fields.Selection(selection_add=[("xlsx", "XLSX")]) + + @api.model + def render_xlsx(self, docids, data): + report_model_name = "report.%s" % self.report_name + report_model = self.env.get(report_model_name) + if report_model is None: + raise UserError(_("%s model was not found") % report_model_name) + return report_model.with_context( + active_model=self.model + ).create_xlsx_report( # noqa + docids, data + ) + + @api.model + def _get_report_from_name(self, report_name): + res = super(ReportAction, self)._get_report_from_name(report_name) + if res: + return res + report_obj = self.env["ir.actions.report"] + qwebtypes = ["xlsx"] + conditions = [ + ("report_type", "in", qwebtypes), + ("report_name", "=", report_name), + ] + context = self.env["res.users"].context_get() + return report_obj.with_context(context).search(conditions, limit=1) diff --git a/report_xlsx/readme/CONTRIBUTORS.rst b/report_xlsx/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..9e5dff7eb --- /dev/null +++ b/report_xlsx/readme/CONTRIBUTORS.rst @@ -0,0 +1,7 @@ +* Adrien Peiffer +* Sébastien Alix +* Stéphane Bidoul +* Enric Tobella +* Graeme Gellatly +* Cristian Salamea +* Rod Schouteden diff --git a/report_xlsx/readme/DESCRIPTION.rst b/report_xlsx/readme/DESCRIPTION.rst new file mode 100644 index 000000000..894b12463 --- /dev/null +++ b/report_xlsx/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module provides a basic report class to generate xlsx report. diff --git a/report_xlsx/readme/INSTALL.rst b/report_xlsx/readme/INSTALL.rst new file mode 100644 index 000000000..f75fbf25e --- /dev/null +++ b/report_xlsx/readme/INSTALL.rst @@ -0,0 +1,7 @@ +Make sure you have ``xlsxwriter`` Python module installed:: + +$ pip3 install xlsxwriter + +For testing it is also necessary ``xlrd`` Python module installed:: + +$ pip3 install xlrd diff --git a/report_xlsx/readme/USAGE.rst b/report_xlsx/readme/USAGE.rst new file mode 100644 index 000000000..751038564 --- /dev/null +++ b/report_xlsx/readme/USAGE.rst @@ -0,0 +1,32 @@ +An example of XLSX report for partners on a module called `module_name`: + +A python class :: + + from odoo import models + + class PartnerXlsx(models.AbstractModel): + _name = 'report.module_name.report_name' + _inherit = 'report.report_xlsx.abstract' + + def generate_xlsx_report(self, workbook, data, partners): + for obj in partners: + report_name = obj.name + # One sheet by partner + sheet = workbook.add_worksheet(report_name[:31]) + bold = workbook.add_format({'bold': True}) + sheet.write(0, 0, obj.name, bold) + +To manipulate the ``workbook`` and ``sheet`` objects, refer to the +`documentation `_ of ``xlsxwriter``. + +A report XML record :: + + diff --git a/report_xlsx/report/__init__.py b/report_xlsx/report/__init__.py new file mode 100644 index 000000000..0d77311ab --- /dev/null +++ b/report_xlsx/report/__init__.py @@ -0,0 +1,2 @@ +from . import report_xlsx +from . import report_partner_xlsx diff --git a/report_xlsx/report/report_partner_xlsx.py b/report_xlsx/report/report_partner_xlsx.py new file mode 100644 index 000000000..14022f353 --- /dev/null +++ b/report_xlsx/report/report_partner_xlsx.py @@ -0,0 +1,16 @@ +# Copyright 2017 Creu Blanca +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import models + + +class PartnerXlsx(models.AbstractModel): + _name = "report.report_xlsx.partner_xlsx" + _inherit = "report.report_xlsx.abstract" + _description = "Partner XLSX Report" + + def generate_xlsx_report(self, workbook, data, partners): + for obj in partners: + sheet = workbook.add_worksheet("Report") + bold = workbook.add_format({"bold": True}) + sheet.write(0, 0, obj.name, bold) diff --git a/report_xlsx/report/report_xlsx.py b/report_xlsx/report/report_xlsx.py new file mode 100644 index 000000000..244d88dc0 --- /dev/null +++ b/report_xlsx/report/report_xlsx.py @@ -0,0 +1,60 @@ +# Copyright 2015 ACSONE SA/NV () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +import logging +from io import BytesIO + +from odoo import models + +_logger = logging.getLogger(__name__) + +try: + import xlsxwriter +except ImportError: + _logger.debug("Can not import xlsxwriter`.") + + +class ReportXlsxAbstract(models.AbstractModel): + _name = "report.report_xlsx.abstract" + _description = "Abstract XLSX Report" + + def _get_objs_for_report(self, docids, data): + """ + Returns objects for xlx report. From WebUI these + are either as docids taken from context.active_ids or + in the case of wizard are in data. Manual calls may rely + on regular context, setting docids, or setting data. + + :param docids: list of integers, typically provided by + qwebactionmanager for regular Models. + :param data: dictionary of data, if present typically provided + by qwebactionmanager for TransientModels. + :param ids: list of integers, provided by overrides. + :return: recordset of active model for ids. + """ + if docids: + ids = docids + elif data and "context" in data: + ids = data["context"].get("active_ids", []) + else: + ids = self.env.context.get("active_ids", []) + return self.env[self.env.context.get("active_model")].browse(ids) + + def create_xlsx_report(self, docids, data): + objs = self._get_objs_for_report(docids, data) + file_data = BytesIO() + workbook = xlsxwriter.Workbook(file_data, self.get_workbook_options()) + self.generate_xlsx_report(workbook, data, objs) + workbook.close() + file_data.seek(0) + return file_data.read(), "xlsx" + + def get_workbook_options(self): + """ + See https://xlsxwriter.readthedocs.io/workbook.html constructor options + :return: A dictionary of options + """ + return {} + + def generate_xlsx_report(self, workbook, data, objs): + raise NotImplementedError() diff --git a/report_xlsx/static/description/icon.png b/report_xlsx/static/description/icon.png new file mode 100644 index 000000000..3a0328b51 Binary files /dev/null and b/report_xlsx/static/description/icon.png differ diff --git a/report_xlsx/static/description/index.html b/report_xlsx/static/description/index.html new file mode 100644 index 000000000..936d3fecc --- /dev/null +++ b/report_xlsx/static/description/index.html @@ -0,0 +1,473 @@ + + + + + + +Base report xlsx + + + +
+

Base report xlsx

+ + +

Beta License: AGPL-3 OCA/reporting-engine Translate me on Weblate Try me on Runbot

+

This module provides a basic report class to generate xlsx report.

+

Table of contents

+ +
+

Installation

+

Make sure you have xlsxwriter Python module installed:

+
+$ pip3 install xlsxwriter
+
+

For testing it is also necessary xlrd Python module installed:

+
+$ pip3 install xlrd
+
+
+
+

Usage

+

An example of XLSX report for partners on a module called module_name:

+

A python class

+
+from odoo import models
+
+class PartnerXlsx(models.AbstractModel):
+    _name = 'report.module_name.report_name'
+    _inherit = 'report.report_xlsx.abstract'
+
+    def generate_xlsx_report(self, workbook, data, partners):
+        for obj in partners:
+            report_name = obj.name
+            # One sheet by partner
+            sheet = workbook.add_worksheet(report_name[:31])
+            bold = workbook.add_format({'bold': True})
+            sheet.write(0, 0, obj.name, bold)
+
+

To manipulate the workbook and sheet objects, refer to the +documentation of xlsxwriter.

+

A report XML record

+
+<report
+    id="partner_xlsx"
+    model="res.partner"
+    string="Print to XLSX"
+    report_type="xlsx"
+    name="module_name.report_name"
+    file="res_partner"
+    attachment_use="False"
+/>
+
+
+
+

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 smashing it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • ACSONE SA/NV
  • +
  • Creu Blanca
  • +
+
+
+

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

+

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

+
+
+
+ + diff --git a/report_xlsx/static/src/js/report/action_manager_report.js b/report_xlsx/static/src/js/report/action_manager_report.js new file mode 100644 index 000000000..2c412c52b --- /dev/null +++ b/report_xlsx/static/src/js/report/action_manager_report.js @@ -0,0 +1,91 @@ +// © 2017 Creu Blanca +// License AGPL-3.0 or later (https://www.gnuorg/licenses/agpl.html). +odoo.define("report_xlsx.report", function (require) { + "use strict"; + + var core = require("web.core"); + var ActionManager = require("web.ActionManager"); + var framework = require("web.framework"); + var session = require("web.session"); + var _t = core._t; + + ActionManager.include({ + + _downloadReportXLSX: function (url, actions) { + var self = this; + framework.blockUI(); + var type = "xlsx"; + var cloned_action = _.clone(actions); + var new_url = url; + + if (_.isUndefined(cloned_action.data) || + _.isNull(cloned_action.data) || + (_.isObject(cloned_action.data) && _.isEmpty(cloned_action.data))) { + if (cloned_action.context.active_ids) { + new_url += "/" + cloned_action.context.active_ids.join(','); + } + } else { + new_url += "?options=" + encodeURIComponent( + JSON.stringify(cloned_action.data)); + new_url += "&context=" + encodeURIComponent( + JSON.stringify(cloned_action.context)); + } + + return new Promise(function (resolve, reject) { + var blocked = !session.get_file({ + url: new_url, + data: { + data: JSON.stringify([new_url, type]), + }, + success: resolve, + error: (error) => { + self.call('crash_manager', 'rpc_error', error); + reject(); + }, + complete: framework.unblockUI, + }); + if (blocked) { + // AAB: this check should be done in get_file service directly, + // should not be the concern of the caller (and that way, get_file + // could return a deferred) + var message = _t('A popup window with your report was blocked. You ' + + 'may need to change your browser settings to allow ' + + 'popup windows for this page.'); + this.do_warn(_t('Warning'), message, true); + } + }); + }, + + _triggerDownload: function (action, options, type) { + var self = this; + var reportUrls = this._makeReportUrls(action); + if (type === "xlsx") { + return this._downloadReportXLSX(reportUrls[type], action).then( + function () { + if (action.close_on_report_download) { + var closeAction = {type: 'ir.actions.act_window_close'}; + return self.doAction(closeAction, _.pick( + options, 'on_close')); + } + return options.on_close(); + }); + } + return this._super.apply(this, arguments); + }, + + _makeReportUrls: function (action) { + var reportUrls = this._super.apply(this, arguments); + reportUrls.xlsx = '/report/xlsx/' + action.report_name; + return reportUrls; + }, + + _executeReportAction: function (action, options) { + var self = this; + if (action.report_type === 'xlsx') { + return self._triggerDownload(action, options, 'xlsx'); + } + return this._super.apply(this, arguments); + }, + }); + +}); diff --git a/report_xlsx/tests/__init__.py b/report_xlsx/tests/__init__.py new file mode 100644 index 000000000..32ae3c2c3 --- /dev/null +++ b/report_xlsx/tests/__init__.py @@ -0,0 +1 @@ +from . import test_report diff --git a/report_xlsx/tests/test_report.py b/report_xlsx/tests/test_report.py new file mode 100644 index 000000000..74e7db95a --- /dev/null +++ b/report_xlsx/tests/test_report.py @@ -0,0 +1,57 @@ +# Copyright 2017 Creu Blanca +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +import logging + +from odoo.tests import common + +_logger = logging.getLogger(__name__) + +try: + from xlrd import open_workbook +except ImportError: + _logger.debug("Can not import xlrd`.") + + +class TestReport(common.TransactionCase): + def setUp(self): + super(TestReport, self).setUp() + report_object = self.env["ir.actions.report"] + self.xlsx_report = self.env["report.report_xlsx.abstract"].with_context( + active_model="res.partner" + ) + self.report_name = "report_xlsx.partner_xlsx" + self.report = report_object._get_report_from_name(self.report_name) + self.docs = self.env["res.company"].search([], limit=1).partner_id + + def test_report(self): + report = self.report + self.assertEqual(report.report_type, "xlsx") + rep = report.render(self.docs.ids, {}) + wb = open_workbook(file_contents=rep[0]) + sheet = wb.sheet_by_index(0) + self.assertEqual(sheet.cell(0, 0).value, self.docs.name) + + def test_id_retrieval(self): + + # Typical call from WebUI with wizard + objs = self.xlsx_report._get_objs_for_report( + False, {"context": {"active_ids": self.docs.ids}} + ) + self.assertEquals(objs, self.docs) + + # Typical call from within code not to report_action + objs = self.xlsx_report.with_context( + active_ids=self.docs.ids + )._get_objs_for_report(False, False) + self.assertEquals(objs, self.docs) + + # Typical call from WebUI + objs = self.xlsx_report._get_objs_for_report( + self.docs.ids, {"data": [self.report_name, self.report.report_type]} + ) + self.assertEquals(objs, self.docs) + + # Typical call from render + objs = self.xlsx_report._get_objs_for_report(self.docs.ids, {}) + self.assertEquals(objs, self.docs) diff --git a/report_xlsx/views/webclient_templates.xml b/report_xlsx/views/webclient_templates.xml new file mode 100644 index 000000000..f8c45fbd8 --- /dev/null +++ b/report_xlsx/views/webclient_templates.xml @@ -0,0 +1,13 @@ + + + +