Skip to content

Commit 737c919

Browse files
committed
Merge PR #595 into 16.0
Signed-off-by alexis-via
2 parents c58c0a9 + 76e5e93 commit 737c919

File tree

10 files changed

+560
-0
lines changed

10 files changed

+560
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
===================================================
2+
Adapt e-invoice generation to France VAT on payment
3+
===================================================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:b0698c1b605ebfa93ede27d3b65fdac8fad7d91757113e61c4e29b343473d8a9
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Mature
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--france-lightgray.png?logo=github
20+
:target: https://github.com/OCA/l10n-france/tree/16.0/l10n_fr_account_vat_return_einvoice_generate
21+
:alt: OCA/l10n-france
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/l10n-france-16-0/l10n-france-16-0-l10n_fr_account_vat_return_einvoice_generate
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-france&target_branch=16.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This is a glue module between **l10n_fr_account_vat_return** and **account_einvoice_generate**.
32+
33+
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.
34+
35+
**Table of contents**
36+
37+
.. contents::
38+
:local:
39+
40+
Bug Tracker
41+
===========
42+
43+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-france/issues>`_.
44+
In case of trouble, please check there if your issue has already been reported.
45+
If you spotted it first, help us to smash it by providing a detailed and welcomed
46+
`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**>`_.
47+
48+
Do not contact contributors directly about support or help with technical issues.
49+
50+
Credits
51+
=======
52+
53+
Authors
54+
~~~~~~~
55+
56+
* Akretion
57+
58+
Contributors
59+
~~~~~~~~~~~~
60+
61+
* Alexis de Lattre <alexis.delattre@akretion.com>
62+
63+
Maintainers
64+
~~~~~~~~~~~
65+
66+
This module is maintained by the OCA.
67+
68+
.. image:: https://odoo-community.org/logo.png
69+
:alt: Odoo Community Association
70+
:target: https://odoo-community.org
71+
72+
OCA, or the Odoo Community Association, is a nonprofit organization whose
73+
mission is to support the collaborative development of Odoo features and
74+
promote its widespread use.
75+
76+
.. |maintainer-alexis-via| image:: https://github.com/alexis-via.png?size=40px
77+
:target: https://github.com/alexis-via
78+
:alt: alexis-via
79+
80+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
81+
82+
|maintainer-alexis-via|
83+
84+
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.
85+
86+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright 2024 Akretion France (http://www.akretion.com/)
2+
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
3+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
4+
5+
{
6+
"name": "Adapt e-invoice generation to France VAT on payment",
7+
"version": "16.0.1.0.0",
8+
"category": "Accounting",
9+
"license": "AGPL-3",
10+
"summary": "Glue module between account_einvoice_generate and l10n_fr_account_vat_return",
11+
"author": "Akretion,Odoo Community Association (OCA)",
12+
"maintainers": ["alexis-via"],
13+
"website": "https://github.com/OCA/l10n-france",
14+
"depends": ["account_einvoice_generate", "l10n_fr_account_vat_return"],
15+
"installable": True,
16+
"auto_install": True,
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import account_move
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright 2024 Akretion France (https://www.akretion.com/)
2+
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
3+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
4+
5+
from odoo import models
6+
7+
8+
class AccountMove(models.Model):
9+
_inherit = "account.move"
10+
11+
def _get_unece_due_date_type_code(self):
12+
# inherit method from account_einvoice_generate => move to
13+
if self.move_type in ("out_invoice", "out_refund"):
14+
if self.out_vat_on_payment:
15+
tax_exigibility = "on_payment"
16+
else:
17+
tax_exigibility = "on_invoice"
18+
return self.env["account.tax"]._get_unece_code_from_tax_exigibility(
19+
tax_exigibility
20+
)
21+
return super()._get_unece_due_date_type_code()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* Alexis de Lattre <alexis.delattre@akretion.com>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This is a glue module between **l10n_fr_account_vat_return** and **account_einvoice_generate**.
2+
3+
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.

0 commit comments

Comments
 (0)