Skip to content

Commit

Permalink
Merge PR #707 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by alexis-via
  • Loading branch information
OCA-git-bot committed Oct 23, 2023
2 parents af00cfa + 74ac350 commit aea5b53
Show file tree
Hide file tree
Showing 15 changed files with 656 additions and 0 deletions.
81 changes: 81 additions & 0 deletions account_invoice_facturx_py3o/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
=====================
Py3o Factur-x Invoice
=====================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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%2Fedi-lightgray.png?logo=github
:target: https://github.com/OCA/edi/tree/14.0/account_invoice_facturx_py3o
:alt: OCA/edi
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/edi-14-0/edi-14-0-account_invoice_facturx_py3o
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/226/14.0
:alt: Try me on Runbot

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

If you use the py3o reporting engine (module *report_py3o* from the `reporting-engine <https://github.com/OCA/reporting-engine>`_ OCA project) to generate your PDF invoices and you want these PDF invoices to be Factur-X invoices (i.e. a PDF invoice with an embedded XML file in CII format), this module is for you ! Factur-X is the e-invoicing standard for France and Germany (in Germany, it is also called ZUGFeRD 2.1).

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/edi/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 <https://github.com/OCA/edi/issues/new?body=module:%20account_invoice_facturx_py3o%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
~~~~~~~

* Akretion

Contributors
~~~~~~~~~~~~

* Alexis de Lattre <[email protected]>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-alexis-via| image:: https://github.com/alexis-via.png?size=40px
:target: https://github.com/alexis-via
:alt: alexis-via

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-alexis-via|

This module is part of the `OCA/edi <https://github.com/OCA/edi/tree/14.0/account_invoice_facturx_py3o>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions account_invoice_facturx_py3o/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
17 changes: 17 additions & 0 deletions account_invoice_facturx_py3o/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2017-2022 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Py3o Factur-x Invoice",
"version": "16.0.1.0.0",
"category": "Invoicing Management",
"license": "AGPL-3",
"summary": "Generate Factur-X invoices with Py3o reporting engine",
"author": "Akretion,Odoo Community Association (OCA)",
"maintainers": ["alexis-via"],
"website": "https://github.com/OCA/edi",
"depends": ["account_invoice_facturx", "report_py3o"],
"installable": True,
"auto_install": True,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_factur-x_py3o
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.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_invoice_factur-x_py3o
#: model:ir.model,name:account_invoice_factur-x_py3o.model_py3o_report
msgid "Report Py30"
msgstr ""

34 changes: 34 additions & 0 deletions account_invoice_facturx_py3o/i18n/account_invoice_facturx_py3o.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_facturx_py3o
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.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_invoice_facturx_py3o
#: model:ir.model.fields,field_description:account_invoice_facturx_py3o.field_py3o_report__display_name
msgid "Display Name"
msgstr ""

#. module: account_invoice_facturx_py3o
#: model:ir.model.fields,field_description:account_invoice_facturx_py3o.field_py3o_report__id
msgid "ID"
msgstr ""

#. module: account_invoice_facturx_py3o
#: model:ir.model.fields,field_description:account_invoice_facturx_py3o.field_py3o_report____last_update
msgid "Last Modified on"
msgstr ""

#. module: account_invoice_facturx_py3o
#: model:ir.model,name:account_invoice_facturx_py3o.model_py3o_report
msgid "Report Py30"
msgstr ""
22 changes: 22 additions & 0 deletions account_invoice_facturx_py3o/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_factur-x_py3o
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-05-24 15:19+0000\n"
"Last-Translator: Frederik Kramer <[email protected]>\n"
"Language-Team: none\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.6.1\n"

#. module: account_invoice_facturx_py3o
#: model:ir.model,name:account_invoice_facturx_py3o.model_py3o_report
msgid "Report Py30"
msgstr "Bericht Py30"
24 changes: 24 additions & 0 deletions account_invoice_facturx_py3o/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_factur-x_py3o
#
# Translators:
# enjolras <[email protected]>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-03-12 01:43+0000\n"
"PO-Revision-Date: 2018-03-12 01:43+0000\n"
"Last-Translator: enjolras <[email protected]>, 2018\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: account_invoice_facturx_py3o
#: model:ir.model,name:account_invoice_facturx_py3o.model_py3o_report
msgid "Report Py30"
msgstr "Informe Py30"
1 change: 1 addition & 0 deletions account_invoice_facturx_py3o/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import py3o_report
26 changes: 26 additions & 0 deletions account_invoice_facturx_py3o/models/py3o_report.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2017-2022 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import models


class Py3oReport(models.TransientModel):
_inherit = "py3o.report"

def _postprocess_report(self, model_instance, result_path):
amo = self.env["account.move"]
invoice_reports = amo._get_invoice_report_names()
if (
self.ir_actions_report_id.report_name in invoice_reports
and model_instance
and len(model_instance) == 1
and self.ir_actions_report_id.report_type == "py3o"
and self.ir_actions_report_id.py3o_filetype == "pdf"
and result_path
):
move = model_instance
# re-write PDF on result_path
if move._xml_format_in_pdf_invoice() == "factur-x":
move.regular_pdf_invoice_to_facturx_invoice(result_path)
return super()._postprocess_report(model_instance, result_path)
1 change: 1 addition & 0 deletions account_invoice_facturx_py3o/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Alexis de Lattre <[email protected]>
1 change: 1 addition & 0 deletions account_invoice_facturx_py3o/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
If you use the py3o reporting engine (module *report_py3o* from the `reporting-engine <https://github.com/OCA/reporting-engine>`_ OCA project) to generate your PDF invoices and you want these PDF invoices to be Factur-X invoices (i.e. a PDF invoice with an embedded XML file in CII format), this module is for you ! Factur-X is the e-invoicing standard for France and Germany (in Germany, it is also called ZUGFeRD 2.1).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit aea5b53

Please sign in to comment.