Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIG] account_e-invoice_generate: Migration to 12.0 #83

Merged
merged 7 commits into from
Jan 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions account_e-invoice_generate/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
==========================
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/12.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-12-0/edi-12-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/12.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 <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_e-invoice_generate%0Aversion:%2012.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 <alexis.delattre@akretion.com>
* Andrea Stirpe <a.stirpe@onestein.nl>
* Shine IT <contact@openerp.cn>

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 <https://github.com/OCA/edi/tree/12.0/account_e-invoice_generate>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions account_e-invoice_generate/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
19 changes: 19 additions & 0 deletions account_e-invoice_generate/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2018 Akretion (http://www.akretion.com)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
'name': 'Account e-invoice Generate',
'version': '12.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,
}
66 changes: 66 additions & 0 deletions account_e-invoice_generate/i18n/account_e-invoice_generate.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# 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.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 ""

5 changes: 5 additions & 0 deletions account_e-invoice_generate/models/__init__.py
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions account_e-invoice_generate/models/account_invoice.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2018 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# 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
13 changes: 13 additions & 0 deletions account_e-invoice_generate/models/res_company.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2018 Akretion (http://www.akretion.com)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# 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')
12 changes: 12 additions & 0 deletions account_e-invoice_generate/models/res_config_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2018 Akretion (http://www.akretion.com)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# 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', readonly=False)
2 changes: 2 additions & 0 deletions account_e-invoice_generate/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The new configuration parameter *XML Format embedded in PDF invoice*
is available in the menu *Accounting > Configuration > Settings*.
3 changes: 3 additions & 0 deletions account_e-invoice_generate/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* Alexis de Lattre <alexis.delattre@akretion.com>
* Andrea Stirpe <a.stirpe@onestein.nl>
* Shine IT <contact@openerp.cn>
8 changes: 8 additions & 0 deletions account_e-invoice_generate/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -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.
Loading