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

[15.0] [mig] l10n_pt_account_invoicexpress #73

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
b9cc071
[ADD] l10n_pt_account_invoicexpress: add InvoiceXpress connector
vimalpatelserpentcs May 24, 2021
abae07a
[UPD] Update l10n_pt_account_invoicexpress.pot
oca-travis Jun 12, 2021
2a46ff3
[UPD] README.rst
OCA-git-bot Jun 12, 2021
549211a
[FIX] l10n_pt_account_invoicexpress,l10n_pt_stock_invoicexpress: send…
dreispt Jun 15, 2021
3697a95
[UPD] Update l10n_pt_account_invoicexpress.pot
oca-travis Jun 16, 2021
1283ecf
l10n_pt_account_invoicexpress 14.0.1.1.0
OCA-git-bot Jun 16, 2021
26178bb
[FIX] l10n_pt_account_invoicexpress: multicompany support, foreign co…
dreispt Jul 5, 2021
299c4a8
[UPD] Update l10n_pt_account_invoicexpress.pot
oca-travis Jul 5, 2021
914520a
l10n_pt_account_invoicexpress 14.0.2.0.0
OCA-git-bot Jul 5, 2021
05bfb65
[IMP] l10n_pt_account_invoicexpress: set the InvoiceXpress number in …
dreispt Jul 8, 2021
3adec58
l10n_pt_account_invoicexpress 14.0.2.0.1
OCA-git-bot Jul 26, 2021
55445b4
Added translation using Weblate (Portuguese)
dreispt Aug 3, 2021
e71b3e5
[IMP] l10n_pt_account_invoicexpress: tolerate customer with no email
dreispt Sep 12, 2021
66057f9
[UPD] Update l10n_pt_account_invoicexpress.pot
oca-travis Sep 16, 2021
e02a45b
l10n_pt_account_invoicexpress 14.0.2.1.0
OCA-git-bot Sep 16, 2021
fa369e7
Update translation files
oca-transbot Sep 16, 2021
53eaa20
[IMP] l10n_pt_*_invoicexpress: expose setup on Company form
dreispt Sep 15, 2021
a3e49e4
[UPD] Update l10n_pt_account_invoicexpress.pot
oca-travis Sep 17, 2021
e1416f9
l10n_pt_account_invoicexpress 14.0.2.2.0
OCA-git-bot Sep 17, 2021
ef22c11
Update translation files
oca-transbot Sep 17, 2021
222be83
[IMP] l10n_pt_account_invoicexpress: allow disabling for some Journals
dreispt Sep 21, 2021
c96d25c
[UPD] Update l10n_pt_account_invoicexpress.pot
oca-travis Sep 23, 2021
33e16cf
l10n_pt_account_invoicexpress 14.0.2.3.0
OCA-git-bot Sep 23, 2021
4bd4476
Update translation files
oca-transbot Sep 23, 2021
4ce2a4e
[IMP] l10n_pt_account_invoicexpress: better module description
dreispt Sep 23, 2021
1824b87
[UPD] Update l10n_pt_account_invoicexpress.pot
oca-travis Sep 23, 2021
0ff4663
[UPD] README.rst
OCA-git-bot Sep 23, 2021
83b59f4
l10n_pt_account_invoicexpress 14.0.2.3.1
OCA-git-bot Sep 23, 2021
23ed7fa
Update translation files
oca-transbot Sep 23, 2021
92c6152
[IMP] l10n_pt_account_invoicexpress: add support for other document t…
dreispt Nov 12, 2021
59ff1f8
[IMP] l10n_pt_account_invoicexpress: remove redundant product ref fro…
dreispt Nov 18, 2021
0f6d6f7
[UPD] Update l10n_pt_account_invoicexpress.pot
oca-travis Nov 18, 2021
d308fc0
l10n_pt_account_invoicexpress 14.0.2.3.2
OCA-git-bot Nov 18, 2021
8dbc221
Update translation files
oca-transbot Nov 18, 2021
16823dc
Translated using Weblate (Portuguese)
dreispt Nov 18, 2021
532397c
[UPD] Update l10n_pt_account_invoicexpress.pot
oca-travis Nov 19, 2021
65770ab
[UPD] README.rst
OCA-git-bot Nov 19, 2021
de1cd7b
l10n_pt_account_invoicexpress 14.0.3.0.0
OCA-git-bot Nov 19, 2021
4056554
Update translation files
oca-transbot Nov 19, 2021
26e9e4b
[FIX]l10n_pt_account_invoicexpress: add missing Country view file
dreispt Nov 19, 2021
435f6f6
l10n_pt_account_invoicexpress 14.0.3.0.1
OCA-git-bot Nov 19, 2021
df1f85e
[IMP] l10n_pt_stock_invoicexpress: add support for transport doc types
dreispt Nov 15, 2021
0dc299e
[UPD] README.rst
OCA-git-bot Nov 19, 2021
bcdef01
l10n_pt_account_invoicexpress 14.0.4.0.0
OCA-git-bot Nov 19, 2021
029876e
[FIX]l10n_pt_account_invoicexpress: use latest Odoo address, instead …
dreispt Nov 19, 2021
a4c5893
l10n_pt_account_invoicexpress 14.0.4.0.1
OCA-git-bot Nov 19, 2021
6d3ced5
[FIX] l10n_pt_account_invoicexpress: limit to InvX supported languages
dreispt Nov 22, 2021
6e5f228
l10n_pt_account_invoicexpress 14.0.4.0.2
OCA-git-bot Nov 23, 2021
f86849d
[FIX] l10n_pt_account_invoicexpress: set language based on destinatio…
dreispt Nov 24, 2021
6a97bbd
l10n_pt_account_invoicexpress 14.0.4.0.3
OCA-git-bot Nov 25, 2021
8529c8e
[IMP] l10n_pt_account_invoicexpress: suport VAT MOSS Credit Notes
dreispt Nov 24, 2021
c9ccca0
[IMP] l10n_pt_account_invoicexpress: fix InvX Settings
dreispt Nov 24, 2021
7217d7d
[UPD] Update l10n_pt_account_invoicexpress.pot
oca-travis Nov 25, 2021
3dad256
l10n_pt_account_invoicexpress 14.0.4.1.0
OCA-git-bot Nov 25, 2021
bbba9fb
Update translation files
oca-transbot Nov 25, 2021
6d54576
l10n_pt_account_invoicexpress 14.0.4.1.1
OCA-git-bot Nov 25, 2021
40b1b32
[IMP] l10n_pt_account_invoicexpress: force update of Invx stored Cont…
dreispt Nov 25, 2021
1257c41
[UPD] Update l10n_pt_account_invoicexpress.pot
oca-travis Nov 26, 2021
0c26775
l10n_pt_account_invoicexpress 14.0.4.1.2
OCA-git-bot Nov 26, 2021
0c2a60a
Update translation files
oca-transbot Nov 26, 2021
557d790
[FIX] l10n_pt_account_invoicexpress: error messages correctly present…
dreispt Mar 10, 2022
092d8fa
[UPD] Update l10n_pt_account_invoicexpress.pot
oca-travis Mar 14, 2022
f51e8c0
l10n_pt_account_invoicexpress 14.0.4.1.3
OCA-git-bot Mar 14, 2022
06a95b7
Update translation files
oca-transbot Mar 14, 2022
768c081
[MIG] l10n_pt_account_invoicexpress: Migration to 15.0
aktiv-heli-kantawala Jul 25, 2022
d14b0eb
[MIG] l10n_pt_account_invoicexpress: black, isort, prettier
aktiv-heli-kantawala Jul 25, 2022
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
166 changes: 166 additions & 0 deletions l10n_pt_account_invoicexpress/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
==================================
Portugal InvoiceXpress Integration
==================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |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%2Fl10n--portugal-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-portugal/tree/14.0/l10n_pt_account_invoicexpress
:alt: OCA/l10n-portugal
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-portugal-14-0/l10n-portugal-14-0-l10n_pt_account_invoicexpress
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/171/14.0
:alt: Try me on Runbot

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

Generate Portuguese tax authority legal Invoices ("Faturas") using InvoiceXpress.

**UPDATE November/2021:**

Invoices:

- Added support to the different documents types:
Invoice, Invoice Receipt, Simplified Invoice and VAT MOSS.
The default document type is set on the Journal,
and can be changed on the Invoice form.

- Use the invoice commercial partner for the name and address,
instead of the invoice contact.

- Added support for the Terms and Conditions/Observations field

- Added to Credit Notes the link to the source Invoice


InvoiceXpress is a paid service.
Visit https://invoicexpress.com for more details.

Once the InvoiceXpress connection is configured,
the invoice CONFIRM button automatically generates the InvoiceXpress invoice.

If the InvoiceXpress Invoice email template is configured,
the InvoiceXpress service will also send the invoice by email,
using the details in Odoo configured email template.

This replaces the Odoo SEND & PRINT button,
since only the InvoiceXpress generated document should be used.
Having other print layouts for the invoice is not allowed
by the Portuguese Tax Authority.

Legal transport documents ("Guias de Transporte" e "Guias de Remessa) are also supported
through the extension module "l10n_pt_stock_invoicexpress".

**Table of contents**

.. contents::
:local:

Configuration
=============

To configure:

- Navigate to Settings/General Settings.
- In the "General Settings" configuration section, locate the "InvoiceXpress" subsection:
There you can set:

- InvoiceXpress Account Name
- InvoiceXpress API Key
- InvoiceXpress Invoice Email Template

The email template is used to prepare the details for the email the InvoiceXpress
service sends with the invoice:

- "To" email address
- "Cc" email address
- Subject
- Body

Translations are supported, and the customer language is used to render
the email details.

The InvoiceXpress configuration is per company,
and can also be modified directly on the Company form,
if the Developer Mode is enabled.

On the Journal form, for sales journals, a flag is available to allow disabling
the InvoiceXpress integration. This can be useful for a journal that was used temporarily
to import invoice history, for reporting purposes, ond was then disabled,
or to allow that journal to use a different legal invoicing system.

Note that all invoices generated MUST use a certified invoicing system.
For a portuguese company, you cannot have some of the invoices being generated by Odoo
itself. So use this option at your own risk, and only in the cases you are sure
to be compliant with TPortugues Tax Authority invoicing regulations.

Usage
=====

On an Invoice, the CONFIRM button automatically generates
an invoice on the InvoiceXpress service.

The "Email InvoiceXpress" button requests the InvoiceXpress service to send an email with a
copy of the legal document.

The Invoice form shows an "InvoiceXpress" tab containing details for
the corresponding InvoiceXpress document.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-portugal/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/l10n-portugal/issues/new?body=module:%20l10n_pt_account_invoicexpress%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
~~~~~~~

* Open Source Integrators

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

* Daniel Reis <dreis@opensourceintegrators.com>, `Open Source Integrators <https://www.opensourceintegrators.eu>`_

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-dreispt| image:: https://github.com/dreispt.png?size=40px
:target: https://github.com/dreispt
:alt: dreispt

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

|maintainer-dreispt|

This module is part of the `OCA/l10n-portugal <https://github.com/OCA/l10n-portugal/tree/14.0/l10n_pt_account_invoicexpress>`_ project on GitHub.

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

from . import models
28 changes: 28 additions & 0 deletions l10n_pt_account_invoicexpress/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright (C) 2021 Open Source Integrators
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Portugal InvoiceXpress Integration",
"summary": "Portuguese certified invoices using InvoiceXpress",
"version": "15.0.1.0.0",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/l10n-portugal",
"category": "Accounting/Localizations/EDI",
"maintainers": ["dreispt"],
"development_status": "Production/Stable",
"depends": ["l10n_pt_vat", "account"],
"data": [
"views/res_config_settings.xml",
"views/account_journal_view.xml",
"views/account_tax_view.xml",
"views/account_move_view.xml",
"views/res_company_view.xml",
"views/res_country_view.xml",
"data/mail_template.xml",
"data/res.country.csv",
],
"images": ["static/description/cover.png"],
"application": True,
"installable": True,
}
43 changes: 43 additions & 0 deletions l10n_pt_account_invoicexpress/data/country_mapping.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Odoo country list was mapped to the InvoiceXpress names as documented at
https://invoicexpress.com/api-v2/documentation/appendix

These InvoiceXpress country names found no macth in Odoo:

Burma
Canton and Enderbury Islands
Dronning Maud Land
East Timor
International Monetary Fund
Ivory Coast
Johnston Island
Kampuchea
Midway Islands
Netherlands Antilles
Samoa (America)
Tahiti
Upper Volta
Vatican
Wake Island
Western Samoa
Zaïre

These Odoo countries found no match in the InvoiceXpress list:

id,name
base.aq,Antarctica
base.bq,Bonaire, Sint Eustatius and Saba
base.bv,Bouvet Island
base.tf,French Southern Territories
base.va,Holy See (Vatican City State)
base.xk,Kosovo
base.bl,Saint Barthélémy
base.mf,Saint Martin (French part)
base.pm,Saint Pierre and Miquelon
base.sx,Sint Maarten (Dutch part)
base.gs,South Georgia and the South Sandwich Islands
base.ss,South Sudan
base.tk,Tokelau
base.to,Tonga
base.um,USA Minor Outlying Islands
base.vi,Virgin Islands (USA)
base.ax,Åland Islands
29 changes: 29 additions & 0 deletions l10n_pt_account_invoicexpress/data/mail_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<odoo noupdate="1">
<record id="email_template_invoice" model="mail.template">
<field name="name">InvoiceXpress: Send Invoice by Email</field>
<field name="model_id" ref="account.model_account_move" />
<field name="subject">Sua Fatura ${object.name | safe}</field>
<field name="email_to">${object.partner_id.email | safe}</field>
<field name="email_cc">${object.env.user.email | safe}</field>
<field name="body_html" type="html">
<p>
Olá,
<br />
Enviamos em anexo a fatura ${object.name | safe}
% if object.ref:
relativa à sua encomenda ${object.ref | safe}
% endif
.
<br />
<br />
Obrigado
% if user.signature:
<br />
${user.signature | safe}
% endif
</p>
</field>
<field name="lang">${object.partner_id.lang}</field>
<field name="auto_delete" eval="True" />
</record>
</odoo>
Loading
Loading