diff --git a/ext/custom-addons/account_e-invoice_generate/README.rst b/ext/custom-addons/account_e-invoice_generate/README.rst new file mode 100644 index 00000000..a63c145c --- /dev/null +++ b/ext/custom-addons/account_e-invoice_generate/README.rst @@ -0,0 +1,87 @@ +========================== +Account e-invoice Generate +========================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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/11.0/account_e-invoice_generate + :alt: OCA/edi +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/edi-11-0/edi-11-0-account_e-invoice_generate + :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/11.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This is a technical module needed to ensure compatibility between +the two electronic invoice generation modules: *account_invoice_ubl* +and *account_invoice_factur-x*. These 2 modules are able to embed an +XML file in the PDF invoice, but for the moment only one XML file can +be embedded in the PDF. And it can be useful to have both modules installed, +because, for example, you may need to generate Factur-X PDF invoices +for some customers and UBL XML files for other customers. So it adds +a configuration parameter to decide which XML format is embedded in the PDF. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +The new configuration parameter *XML Format embedded in PDF invoice* +is available in the menu *Accounting > Configuration > Settings*. + +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 +~~~~~~~ + +* Akretion + +Contributors +~~~~~~~~~~~~ + +* Alexis de Lattre +* Andrea Stirpe + +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/edi `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/ext/custom-addons/account_e-invoice_generate/__init__.py b/ext/custom-addons/account_e-invoice_generate/__init__.py new file mode 100644 index 00000000..31660d6a --- /dev/null +++ b/ext/custom-addons/account_e-invoice_generate/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import models diff --git a/ext/custom-addons/account_e-invoice_generate/__manifest__.py b/ext/custom-addons/account_e-invoice_generate/__manifest__.py new file mode 100644 index 00000000..8b8b95af --- /dev/null +++ b/ext/custom-addons/account_e-invoice_generate/__manifest__.py @@ -0,0 +1,19 @@ +# Copyright 2018 Akretion (http://www.akretion.com) +# @author: Alexis de Lattre +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + 'name': 'Account e-invoice Generate', + 'version': '11.0.1.0.0', + 'category': 'Accounting & Finance', + 'license': 'AGPL-3', + 'summary': 'Technical module to generate PDF invoices with ' + 'embedded XML file', + 'author': 'Akretion,Odoo Community Association (OCA)', + 'website': 'https://github.com/OCA/edi', + 'depends': ['account'], + 'data': [ + 'views/res_config_settings.xml', + ], + 'installable': True, +} diff --git a/ext/custom-addons/account_e-invoice_generate/i18n/account_e-invoice_generate.pot b/ext/custom-addons/account_e-invoice_generate/i18n/account_e-invoice_generate.pot new file mode 100644 index 00000000..d5e16db7 --- /dev/null +++ b/ext/custom-addons/account_e-invoice_generate/i18n/account_e-invoice_generate.pot @@ -0,0 +1,71 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_e-invoice_generate +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.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_e-invoice_generate +#: model:ir.ui.view,arch_db:account_e-invoice_generate.view_account_config_settings +msgid "" +msgstr "" + +#. module: account_e-invoice_generate +#: model:ir.model,name:account_e-invoice_generate.model_res_company +msgid "Companies" +msgstr "" + +#. module: account_e-invoice_generate +#: model:ir.ui.view,arch_db:account_e-invoice_generate.view_account_config_settings +msgid "Electronic Invoices" +msgstr "" + +#. module: account_e-invoice_generate +#: model:ir.ui.view,arch_db:account_e-invoice_generate.view_account_config_settings +msgid "Format" +msgstr "" + +#. module: account_e-invoice_generate +#: model:ir.model,name:account_e-invoice_generate.model_account_invoice +msgid "Invoice" +msgstr "" + +#. module: account_e-invoice_generate +#: selection:res.company,xml_format_in_pdf_invoice:0 +msgid "None" +msgstr "" + +#. module: account_e-invoice_generate +#: model:ir.ui.view,arch_db:account_e-invoice_generate.view_account_config_settings +msgid "Select Format" +msgstr "" + +#. module: account_e-invoice_generate +#: model:ir.ui.view,arch_db:account_e-invoice_generate.view_account_config_settings +msgid "Select the format of your e-invoices." +msgstr "" + +#. module: account_e-invoice_generate +#: selection:res.company,xml_format_in_pdf_invoice:0 +msgid "Universal Business Language (UBL)" +msgstr "" + +#. module: account_e-invoice_generate +#: model:ir.model.fields,field_description:account_e-invoice_generate.field_res_company_xml_format_in_pdf_invoice +#: model:ir.model.fields,field_description:account_e-invoice_generate.field_res_config_settings_xml_format_in_pdf_invoice +msgid "XML Format embedded in PDF invoice" +msgstr "" + +#. module: account_e-invoice_generate +#: model:ir.model,name:account_e-invoice_generate.model_res_config_settings +msgid "res.config.settings" +msgstr "" + diff --git a/ext/custom-addons/account_e-invoice_generate/i18n/nl_NL.po b/ext/custom-addons/account_e-invoice_generate/i18n/nl_NL.po new file mode 100644 index 00000000..d234d6cb --- /dev/null +++ b/ext/custom-addons/account_e-invoice_generate/i18n/nl_NL.po @@ -0,0 +1,75 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_e-invoice_generate +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-04-30 14:03+0000\n" +"Last-Translator: Cas Vissers \n" +"Language-Team: none\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" +"X-Generator: Weblate 3.5.1\n" + +#. module: account_e-invoice_generate +#: model:ir.ui.view,arch_db:account_e-invoice_generate.view_account_config_settings +msgid "" +msgstr "" +"" + +#. module: account_e-invoice_generate +#: model:ir.model,name:account_e-invoice_generate.model_res_company +msgid "Companies" +msgstr "Bedrijven" + +#. module: account_e-invoice_generate +#: model:ir.ui.view,arch_db:account_e-invoice_generate.view_account_config_settings +msgid "Electronic Invoices" +msgstr "Elektronische facturen" + +#. module: account_e-invoice_generate +#: model:ir.ui.view,arch_db:account_e-invoice_generate.view_account_config_settings +msgid "Format" +msgstr "Formaat" + +#. module: account_e-invoice_generate +#: model:ir.model,name:account_e-invoice_generate.model_account_invoice +msgid "Invoice" +msgstr "Factuur" + +#. module: account_e-invoice_generate +#: selection:res.company,xml_format_in_pdf_invoice:0 +msgid "None" +msgstr "Geen" + +#. module: account_e-invoice_generate +#: model:ir.ui.view,arch_db:account_e-invoice_generate.view_account_config_settings +msgid "Select Format" +msgstr "Selecteer formaat" + +#. module: account_e-invoice_generate +#: model:ir.ui.view,arch_db:account_e-invoice_generate.view_account_config_settings +msgid "Select the format of your e-invoices." +msgstr "Selecteer het formaat van uw e-facturen." + +#. module: account_e-invoice_generate +#: selection:res.company,xml_format_in_pdf_invoice:0 +msgid "Universal Business Language (UBL)" +msgstr "Universal Business Language (UBL)" + +#. module: account_e-invoice_generate +#: model:ir.model.fields,field_description:account_e-invoice_generate.field_res_company_xml_format_in_pdf_invoice +#: model:ir.model.fields,field_description:account_e-invoice_generate.field_res_config_settings_xml_format_in_pdf_invoice +msgid "XML Format embedded in PDF invoice" +msgstr "XML formaat toegevoegd aan PDF factuur" + +#. module: account_e-invoice_generate +#: model:ir.model,name:account_e-invoice_generate.model_res_config_settings +msgid "res.config.settings" +msgstr "res.config.settings" diff --git a/ext/custom-addons/account_e-invoice_generate/models/__init__.py b/ext/custom-addons/account_e-invoice_generate/models/__init__.py new file mode 100644 index 00000000..5438b8b8 --- /dev/null +++ b/ext/custom-addons/account_e-invoice_generate/models/__init__.py @@ -0,0 +1,5 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import res_company +from . import res_config_settings +from . import account_invoice diff --git a/ext/custom-addons/account_e-invoice_generate/models/account_invoice.py b/ext/custom-addons/account_e-invoice_generate/models/account_invoice.py new file mode 100644 index 00000000..153ae23e --- /dev/null +++ b/ext/custom-addons/account_e-invoice_generate/models/account_invoice.py @@ -0,0 +1,13 @@ +# Copyright 2018 Akretion (Alexis de Lattre ) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models + + +class AccountInvoice(models.Model): + _inherit = 'account.invoice' + + def get_payment_identifier(self): + """This method is designed to be inherited in localization modules""" + self.ensure_one() + return None diff --git a/ext/custom-addons/account_e-invoice_generate/models/res_company.py b/ext/custom-addons/account_e-invoice_generate/models/res_company.py new file mode 100644 index 00000000..98173780 --- /dev/null +++ b/ext/custom-addons/account_e-invoice_generate/models/res_company.py @@ -0,0 +1,13 @@ +# Copyright 2018 Akretion (http://www.akretion.com) +# @author: Alexis de Lattre +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ResCompany(models.Model): + _inherit = 'res.company' + + xml_format_in_pdf_invoice = fields.Selection([ + ('none', 'None'), + ], string='XML Format embedded in PDF invoice') diff --git a/ext/custom-addons/account_e-invoice_generate/models/res_config_settings.py b/ext/custom-addons/account_e-invoice_generate/models/res_config_settings.py new file mode 100644 index 00000000..dd8c6b77 --- /dev/null +++ b/ext/custom-addons/account_e-invoice_generate/models/res_config_settings.py @@ -0,0 +1,12 @@ +# Copyright 2018 Akretion (http://www.akretion.com) +# @author: Alexis de Lattre +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + _inherit = 'res.config.settings' + + xml_format_in_pdf_invoice = fields.Selection( + related='company_id.xml_format_in_pdf_invoice') diff --git a/ext/custom-addons/account_e-invoice_generate/readme/CONFIGURE.rst b/ext/custom-addons/account_e-invoice_generate/readme/CONFIGURE.rst new file mode 100644 index 00000000..12f3028e --- /dev/null +++ b/ext/custom-addons/account_e-invoice_generate/readme/CONFIGURE.rst @@ -0,0 +1,2 @@ +The new configuration parameter *XML Format embedded in PDF invoice* +is available in the menu *Accounting > Configuration > Settings*. diff --git a/ext/custom-addons/account_e-invoice_generate/readme/CONTRIBUTORS.rst b/ext/custom-addons/account_e-invoice_generate/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..1befc121 --- /dev/null +++ b/ext/custom-addons/account_e-invoice_generate/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Alexis de Lattre +* Andrea Stirpe diff --git a/ext/custom-addons/account_e-invoice_generate/readme/DESCRIPTION.rst b/ext/custom-addons/account_e-invoice_generate/readme/DESCRIPTION.rst new file mode 100644 index 00000000..856bdc80 --- /dev/null +++ b/ext/custom-addons/account_e-invoice_generate/readme/DESCRIPTION.rst @@ -0,0 +1,8 @@ +This is a technical module needed to ensure compatibility between +the two electronic invoice generation modules: *account_invoice_ubl* +and *account_invoice_factur-x*. These 2 modules are able to embed an +XML file in the PDF invoice, but for the moment only one XML file can +be embedded in the PDF. And it can be useful to have both modules installed, +because, for example, you may need to generate Factur-X PDF invoices +for some customers and UBL XML files for other customers. So it adds +a configuration parameter to decide which XML format is embedded in the PDF. diff --git a/ext/custom-addons/account_e-invoice_generate/static/description/icon.png b/ext/custom-addons/account_e-invoice_generate/static/description/icon.png new file mode 100644 index 00000000..3a0328b5 Binary files /dev/null and b/ext/custom-addons/account_e-invoice_generate/static/description/icon.png differ diff --git a/ext/custom-addons/account_e-invoice_generate/static/description/index.html b/ext/custom-addons/account_e-invoice_generate/static/description/index.html new file mode 100644 index 00000000..d55ca5cf --- /dev/null +++ b/ext/custom-addons/account_e-invoice_generate/static/description/index.html @@ -0,0 +1,433 @@ + + + + + + +Account e-invoice Generate + + + +
+

Account e-invoice Generate

+ + +

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

+

This is a technical module needed to ensure compatibility between +the two electronic invoice generation modules: account_invoice_ubl +and account_invoice_factur-x. These 2 modules are able to embed an +XML file in the PDF invoice, but for the moment only one XML file can +be embedded in the PDF. And it can be useful to have both modules installed, +because, for example, you may need to generate Factur-X PDF invoices +for some customers and UBL XML files for other customers. So it adds +a configuration parameter to decide which XML format is embedded in the PDF.

+

Table of contents

+ +
+

Configuration

+

The new configuration parameter XML Format embedded in PDF invoice +is available in the menu Accounting > Configuration > Settings.

+
+
+

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

+
    +
  • Akretion
  • +
+
+
+

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

+

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

+
+
+
+ + diff --git a/ext/custom-addons/account_e-invoice_generate/views/res_config_settings.xml b/ext/custom-addons/account_e-invoice_generate/views/res_config_settings.xml new file mode 100644 index 00000000..857424ea --- /dev/null +++ b/ext/custom-addons/account_e-invoice_generate/views/res_config_settings.xml @@ -0,0 +1,35 @@ + + + + + + res.config.settings + + + +

Electronic Invoices

+
+
+
+
+
+
+
+ + + + +