-
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] l10n_fr_account_vat_return_einvoice_generate
This is a glue module between l10n_fr_account_vat_return and account_einvoice_generate
- Loading branch information
1 parent
fc86b11
commit 75adaf3
Showing
10 changed files
with
561 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
=================================================== | ||
Adapt e-invoice generation to France VAT on payment | ||
=================================================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:b0698c1b605ebfa93ede27d3b65fdac8fad7d91757113e61c4e29b343473d8a9 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Mature | ||
.. |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--france-lightgray.png?logo=github | ||
:target: https://github.com/OCA/l10n-france/tree/16.0/l10n_fr_account_vat_return_einvoice_generate | ||
:alt: OCA/l10n-france | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/l10n-france-16-0/l10n-france-16-0-l10n_fr_account_vat_return_einvoice_generate | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-france&target_branch=16.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This is a glue module between **l10n_fr_account_vat_return** and **account_einvoice_generate**. | ||
|
||
When this module is installed, Odoo will set the UNECE Due Date Type Code for tax exigibility in the invoice's XML file from the boolean field **out_vat_on_payment** of the invoice (field added by the module *l10n_fr_account_vat_return*) instead of the native field **tax_exigibility** of the tax. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-france/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/l10n-france/issues/new?body=module:%20l10n_fr_account_vat_return_einvoice_generate%0Aversion:%2016.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/l10n-france <https://github.com/OCA/l10n-france/tree/16.0/l10n_fr_account_vat_return_einvoice_generate>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
18 changes: 18 additions & 0 deletions
18
l10n_fr_account_vat_return_einvoice_generate/__manifest__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright 2024 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": "Adapt e-invoice generation to France VAT on payment", | ||
"version": "16.0.1.0.0", | ||
"category": "Accounting", | ||
"license": "AGPL-3", | ||
"summary": "Glue module between account_einvoice_generate and l10n_fr_account_vat_return", | ||
"author": "Akretion,Odoo Community Association (OCA)", | ||
"maintainers": ["alexis-via"], | ||
"development_status": "Mature", | ||
"website": "https://github.com/OCA/l10n-france", | ||
"depends": ["account_einvoice_generate", "l10n_fr_account_vat_return"], | ||
"installable": True, | ||
"auto_install": True, | ||
} |
1 change: 1 addition & 0 deletions
1
l10n_fr_account_vat_return_einvoice_generate/models/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import account_move |
21 changes: 21 additions & 0 deletions
21
l10n_fr_account_vat_return_einvoice_generate/models/account_move.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright 2024 Akretion France (https://www.akretion.com/) | ||
# @author: Alexis de Lattre <[email protected]> | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import models | ||
|
||
|
||
class AccountMove(models.Model): | ||
_inherit = "account.move" | ||
|
||
def _get_unece_due_date_type_code(self): | ||
# inherit method from account_einvoice_generate => move to | ||
if self.move_type in ("out_invoice", "out_refund"): | ||
if self.out_vat_on_payment: | ||
tax_exigibility = "on_payment" | ||
else: | ||
tax_exigibility = "on_invoice" | ||
return self.env["account.tax"]._get_unece_code_from_tax_exigibility( | ||
tax_exigibility | ||
) | ||
return super()._get_unece_due_date_type_code() |
1 change: 1 addition & 0 deletions
1
l10n_fr_account_vat_return_einvoice_generate/readme/CONTRIBUTORS.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* Alexis de Lattre <[email protected]> |
3 changes: 3 additions & 0 deletions
3
l10n_fr_account_vat_return_einvoice_generate/readme/DESCRIPTION.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This is a glue module between **l10n_fr_account_vat_return** and **account_einvoice_generate**. | ||
|
||
When this module is installed, Odoo will set the UNECE Due Date Type Code for tax exigibility in the invoice's XML file from the boolean field **out_vat_on_payment** of the invoice (field added by the module *l10n_fr_account_vat_return*) instead of the native field **tax_exigibility** of the tax. |
Oops, something went wrong.