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

[18.0][MIG] Chorus modules #602

Open
wants to merge 117 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
4bdbaa7
Add modules l10n_fr_chorus_account, l10n_fr_chorus_sale, l10n_fr_chor…
alexis-via Aug 23, 2017
670e7e2
Adapt to the rename of sale.agreement to agreement
alexis-via Sep 10, 2017
3857db1
Adapt to latest changes in the agreement_account module
alexis-via Sep 17, 2017
f004e43
OCA Transbot updated translations from Transifex
oca-transbot Dec 2, 2017
6a78440
Add support for Chorus API
alexis-via Dec 28, 2017
df37281
[FIX] Call the right WS to update invoice status
alexis-via Jan 21, 2018
3d1abef
Set field fr_chorus_required of res.partner via the API
alexis-via Feb 16, 2018
bc27bcf
Cron should not try to update invoices in MANDATEE state
alexis-via Feb 16, 2018
2da80a6
Add wizard to send multiple invoices to Chorus
alexis-via Mar 6, 2018
4fcead4
Mark invoice as sent after deposit via Chorus WS
alexis-via Mar 7, 2018
9d0426c
Improve logs
alexis-via Mar 7, 2018
10a5d85
[FIX] chorus: missing string in parent menu entry
alexis-via Mar 23, 2018
e3d6e2b
OCA Transbot updated translations from Transifex
oca-transbot Mar 24, 2018
c4b9f0a
Add groups=l10n_fr_chorus_account.group_chorus_api on Chorus menu ent…
alexis-via Apr 17, 2018
d6c2b18
Move code of prepare_chorus_deposer_flux_payload() to l10n_fr_chorus_…
alexis-via Apr 30, 2018
41d8162
Fix file extension
alexis-via Apr 30, 2018
35d37e9
Workaround to make consulterCR work for Factur-X
alexis-via May 2, 2018
91bf550
Add checks on payment modes and bank account upon invoice validation
alexis-via May 2, 2018
bedf045
Improve constrains on Services for Chorus invoices
alexis-via May 14, 2018
0c4a294
[UPD] Update l10n_fr_chorus_account.pot
oca-travis Jun 22, 2018
ecf0498
[UPD] Update l10n_fr_chorus_sale.pot
oca-travis Jun 22, 2018
48a2b3a
Add module l10n_fr_account_invoice_import_factur-x
alexis-via Jul 12, 2018
67f6fe6
transmit.method: 'Chorus' -> 'Chorus Pro'
alexis-via Jul 18, 2018
3bfdaa5
Translated using Weblate (French)
kryskool Jul 18, 2018
24a1c20
[UPD] Update l10n_fr_chorus_account.pot
oca-travis Jul 31, 2018
e128093
l10n_fr_chorus_account: Chorus API expiry reminder
alexis-via Sep 14, 2018
6965ca7
Fix translation
alexis-via Sep 14, 2018
796eaa4
Improve chorus expiry date management
alexis-via Sep 14, 2018
e36bc61
Pylint fix
alexis-via Sep 16, 2018
28bac6d
[UPD] Update l10n_fr_chorus_account.pot
oca-travis Sep 16, 2018
8e2311c
[FIX] Invoice transmission via Chorus API when using py3o: now use th…
alexis-via Oct 5, 2018
a292d56
[UPD] Update l10n_fr_chorus_account.pot
oca-travis Oct 5, 2018
63b7758
Update translation files
oca-transbot Dec 9, 2018
1c4d730
l10n_fr_chorus_account: get services of Chorus partners via API
alexis-via Dec 18, 2018
18488d4
Remove field fr_chorus_service_code on partner contacts (only use fr_…
alexis-via Dec 18, 2018
2e8a515
Add cron to update Chorus partners via API
alexis-via Dec 18, 2018
7888d4a
chorus: check that the service is active upon order/inv validation
alexis-via Dec 20, 2018
2085a4e
[UPD] Update l10n_fr_chorus_account.pot
oca-travis Dec 21, 2018
865adc8
[UPD] Update l10n_fr_chorus_sale.pot
oca-travis Dec 21, 2018
dfa3abe
Update translation files
oca-transbot Dec 21, 2018
5401d95
l10n_fr_chorus_account: cron now update flows that have a temporary s…
alexis-via Jan 9, 2019
ff27563
Skip Chorus service 'Service des factures publiques' (code 'FACTURES_…
alexis-via Mar 12, 2019
c7fa839
[ADD] icon.png
OCA-git-bot Apr 3, 2019
99a11a2
l10n_fr_chorus_account: fix name_search on chorus service
alexis-via Aug 7, 2019
2e6df5b
l10n_fr_chorus_account: FIX following PISTE migration (add Content-ty…
alexis-via Jan 21, 2020
ed2f7a2
Chorus Pro API: add support for PISTE
alexis-via May 8, 2020
d06c487
Add option to check commitment number
alexis-via May 8, 2020
b9e0ad0
l10n_fr_chorus_account: add external_dependencies
alexis-via May 13, 2020
21815ca
chorus: improve service_or_engagement
alexis-via May 21, 2020
c7776a2
[UPD] README.rst
OCA-git-bot May 21, 2020
1e8ed04
[MIG] chorus modules from v10 to v12
alexis-via May 21, 2020
9d68c6d
[MIG] Chorus stack from v12 to v13
alexis-via Jun 10, 2020
f822d56
Black, isort on chorus modules
alexis-via Jun 10, 2020
6fe76a5
l10n_fr_account_tax_unece: also apply on inactive taxes
alexis-via Jun 23, 2020
2a1ac87
[MIG] l10n_fr_chorus_account, l10n_fr_chorus_sale, l10n_fr_chorus_fac…
alexis-via Nov 24, 2020
56b6b2a
black/isort on chorus modules
alexis-via Nov 24, 2020
0abc5ec
l10n_fr_chorus_account: Fix max size of engagement juridique
alexis-via Feb 22, 2021
dd24b79
Add chorus_status in invoice tree view (optional)
alexis-via Jul 3, 2021
836e553
[FIX] fix access right, reading ir action need to be done with sudo
sebastienbeau Sep 23, 2021
3e767d1
chorus connector: add support for attachments (Factur-X)
alexis-via Oct 7, 2021
9f21247
[UPD] Update l10n_fr_chorus_account.pot
oca-travis Oct 31, 2021
db263e6
[UPD] Update l10n_fr_chorus_facturx.pot
oca-travis Oct 31, 2021
1d3ba1c
[UPD] Update l10n_fr_chorus_sale.pot
oca-travis Oct 31, 2021
fe11451
[UPD] README.rst
OCA-git-bot Oct 31, 2021
3a3a13f
[MIG] l10n_fr_chorus_account, l10n_fr_chorus_sale, l10n_fr_chorus_fac…
alexis-via Jan 2, 2022
89cfd7b
[IMP] l10n_fr_chorus_account: Add support for statuts "Intégré partiel"
alexis-via Nov 28, 2022
f846573
[UPD] Update l10n_fr_chorus_account.pot
Dec 3, 2022
0099a41
[UPD] Update l10n_fr_chorus_facturx.pot
Dec 3, 2022
539378d
[UPD] Update l10n_fr_chorus_sale.pot
Dec 3, 2022
7d6ed34
[UPD] README.rst
OCA-git-bot Dec 3, 2022
50dc80a
Update translation files
weblate Dec 3, 2022
488206d
Update translation files
weblate Dec 3, 2022
fc2d19e
[FIX] l10n_fr_chorus_facturx: sending py3o invoices now works
alexis-via Dec 27, 2022
077b4ce
l10n_fr_chorus_account: strictly follow the API instructions of Choru…
alexis-via Dec 27, 2022
7517182
[MIG] Chorus Pro connector to v16
alexis-via Jan 16, 2023
91f3d3f
[UPD] Update l10n_fr_chorus_account.pot
Jun 27, 2023
9e389e8
[UPD] Update l10n_fr_chorus_facturx.pot
Jun 27, 2023
9f05353
[UPD] Update l10n_fr_chorus_sale.pot
Jun 27, 2023
7672741
[UPD] README.rst
OCA-git-bot Jun 27, 2023
8d5f897
Update translation files
weblate Jun 27, 2023
f72d711
Update translation files
weblate Jun 27, 2023
afb975f
Translated using Weblate (French)
Jun 28, 2023
bb61a27
Translated using Weblate (Italian)
francesco-ooops Jul 11, 2023
4709588
Translated using Weblate (Spanish)
Ivorra78 Aug 9, 2023
192df82
Translated using Weblate (Spanish)
Ivorra78 Aug 9, 2023
16ce03c
Added translation using Weblate (Spanish)
Ivorra78 Aug 22, 2023
5d95eb4
[UPD] README.rst
OCA-git-bot Sep 3, 2023
a3836f1
Translated using Weblate (Spanish)
Ivorra78 Aug 22, 2023
23625e4
l10n_fr_chorus_account: update URL to piste.gouv.fr
alexis-via Sep 18, 2023
916b6c3
oca-github-bot post-merge updates
OCA-git-bot Sep 18, 2023
39bdb09
Update translation files
weblate Oct 9, 2023
905648f
Translated using Weblate (French)
remi-filament Nov 6, 2023
2c38d53
l10n_fr_chorus_account: improve strings
alexis-via Mar 2, 2024
05bcb7c
Added translation using Weblate (French)
Mar 2, 2024
1658d60
[UPD] Update l10n_fr_chorus_account.pot
Mar 2, 2024
e593f3e
[BOT] post-merge updates
OCA-git-bot Mar 2, 2024
0cf6399
Translated using Weblate (French)
Mar 2, 2024
47ea831
Translated using Weblate (French)
Mar 2, 2024
ae461c8
Update translation files
weblate Mar 2, 2024
6d99a70
Translated using Weblate (Spanish)
Ivorra78 Mar 4, 2024
906cd23
[IMP] chorus modules: pre-commit auto fixes
alexis-via Mar 5, 2024
cbfc5a6
[MIG] l10n_fr_chorus_account, l10n_fr_chorus_sale, l10n_fr_chorus_fac…
alexis-via Mar 5, 2024
89cd194
[UPD] Update l10n_fr_chorus_account.pot
Mar 18, 2024
a151bfa
[UPD] Update l10n_fr_chorus_facturx.pot
Mar 18, 2024
463bff3
[UPD] Update l10n_fr_chorus_sale.pot
Mar 18, 2024
d1cbd01
[BOT] post-merge updates
OCA-git-bot Mar 18, 2024
94a89a0
Update translation files
weblate Mar 18, 2024
e91ed01
Update translation files
weblate Mar 18, 2024
3eeb0bb
Update translation files
weblate Mar 18, 2024
1d44a12
Added translation using Weblate (Spanish)
Ivorra78 Mar 20, 2024
e5d7e66
Translated using Weblate (Spanish)
Ivorra78 Mar 20, 2024
425d0b4
Translated using Weblate (Spanish)
Ivorra78 Mar 20, 2024
81dcfee
Translated using Weblate (Spanish)
Ivorra78 Mar 20, 2024
9afa52e
[REF] l10n_fr_chorus_account: pre-commit fixes
dreispt May 24, 2024
eb061bd
[BOT] post-merge updates
OCA-git-bot May 24, 2024
64e2eb8
[IMP] l10n_fr_chorus_*: pre-commit fixes
alexis-via Jan 2, 2025
31e5620
[MIG] l10n_fr_chorus_*: migrate to v18
alexis-via Jan 3, 2025
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
172 changes: 172 additions & 0 deletions l10n_fr_chorus_account/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
==============
L10n FR Chorus
==============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:233370d31ac780568aec5247004616ad883ec16eec023fe29f53a7adc85ccd78
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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%2Fl10n--france-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-france/tree/18.0/l10n_fr_chorus_account
: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-18-0/l10n-france-18-0-l10n_fr_chorus_account
: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=18.0
:alt: Try me on Runboat

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

This is the base module for the support of `Chorus
Pro <https://chorus-pro.gouv.fr/>`__, the electronic invoicing plateform
of the French administration. Chorus Pro specifications are available on
`Chorus Pro Community
website <https://communaute-chorus-pro.finances.gouv.fr/>`__. All the
suppliers of the French administration must send their invoices through
Chorus Pro. To know more about Chorus and the obligation to send
electronic invoices to the French administration, read `the dedicated
page <https://www.economie.gouv.fr/entreprises/marches-publics-facture-electronique>`__
on the website of the Ministry of Economic Affairs.

To be able to generate an electronic invoice for Chorus, you need the
module *l10n_fr_chorus_factur-x* or *l10n_fr_chorus_ubl*.

**Table of contents**

.. contents::
:local:

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

On the customers that you invoice via Chorus, you must:

- enter their *SIRET* (*Accounting* tab),
- select *Chorus* as *Customer Invoice Transmission Method*
(*Accounting* tab),
- select the *Info Required for Chorus* to the value that you obtained
from Chorus (menu *Rechercher Structure Publique*),
- if the service is a required information for that customer in Chorus,
you must create the Chorus service and then create an invoicing
contact and select the related *Chorus Service* and make sure that
this contact is used as *Customer* on the invoice.

If you want to use the Chorus API to easily send invoices to Chorus from
Odoo, you must:

- edit the Odoo server configuration file and add two keys
*chorus_api_oauth_id* and *chorus_api_oauth_secret* that contain your
Oauth client ID and client secret obtained via
`PISTE <https://piste.gouv.fr/>`__. Don't forget to restart the Odoo
server after the update of its configuration file.
- in the menu *Accounting > Configuration > Settings*, in the section
*Chorus API*, enable the option *Use Chorus API*, which will add all
users to the *Chorus API* group. Then set the additional
configuration parameters for Chorus API that will be prompted on the
settings page.

In the menu *Settings > Technical > Automation > Scheduled Actions*, you
should also activate the 3 scheduled actions related to Chorus Pro.

Usage
=====

On the customer form view of a French public administration, in the
*Accounting* tab, set the *Customer Invoice Transmission Method* to
*Chorus Pro*. You will then see a new section *Chorus Pro*. In this
section, you should set the *Info required for Chorus* and, if the
administration is *Service required*, you must create the Chorus
services.

If you enabled the Chorus API, just click on the button *Update Info
Required for Chorus* and it will set the field *Info required for
Chorus* and download all the Chorus services of that administration.

When you try to validate a customer invoice/refund for a customer for
which you send the invoices via Chorus Pro, it will check the value of
the field *Info required for Chorus* and check that this invoice has an
order reference or/and a Chorus service if required for that customer.

If you enabled the Chorus API, you should see a button *Send to Chorus*
on validated customer invoices and refunds that have a transmission
method set to *Chorus Pro*. You can also select several customer
invoices/refunds and do *Action > Send to Chorus Pro*.

Sending an invoice via the Chorus API creates a Chorus Flow, cf menu
*Accounting > Configuration > Chorus Pro > Chorus Flows* (it is not
really a configuration thing... so we could argue that it should not be
in the configuration menu !). You can click on the button *Update Flow
Status* to refresh the status of the flow, until it reaches the status
*IN_INTEGRE*. Then, click on the button *Get Chorus Invoice Identifiers*
to get the technical identifiers of the invoice in Chorus (and write it
on the invoice in Odoo) and get the status of the invoice in Chorus.
Eventually, on the invoice, you can click on the button *Update Chorus
Invoice Status* to refresh the *Chorus Invoice Status*. All these
actions to refresh the status of the Chorus flows and of the invoice are
automated via the *Scheduled Action* named *Chorus Pro Invoice Status
Update*. So, if that scheduled action is active, you should not have to
manually perform the actions described in this paragraph.

In the list view of customer invoices, you can group by *Chorus Status*:
that way, you get on overview of the status of all the invoices you sent
to Chorus Pro, and you can easily spot if an invoice has been refused
for example.

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_chorus_account%0Aversion:%2018.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>

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/18.0/l10n_fr_chorus_account>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions l10n_fr_chorus_account/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import wizard
34 changes: 34 additions & 0 deletions l10n_fr_chorus_account/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2017-2022 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "L10n FR Chorus",
"summary": "Generate Chorus-compliant e-invoices and transmit them "
"via the Chorus API",
"version": "18.0.1.0.0",
"category": "French Localization",
"author": "Akretion,Odoo Community Association (OCA)",
"maintainers": ["alexis-via"],
"website": "https://github.com/OCA/l10n-france",
"license": "AGPL-3",
"depends": [
"l10n_fr_siret_account",
"server_environment",
],
"external_dependencies": {"python": ["requests_oauthlib"]},
"data": [
"security/group.xml",
"security/ir.model.access.csv",
"data/ir_cron.xml",
"data/mail_template.xml",
"wizard/account_invoice_chorus_send_view.xml",
"views/chorus_flow.xml",
"views/chorus_partner_service.xml",
"views/res_partner.xml",
"views/res_config_settings.xml",
"views/account_move.xml",
],
"demo": ["demo/demo.xml"],
"installable": True,
}
38 changes: 38 additions & 0 deletions l10n_fr_chorus_account/data/ir_cron.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2017-2021 Akretion France (http://www.akretion.com/)
@author Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo noupdate="1">
<record id="chorus_flow_cron" model="ir.cron">
<field name="name">Chorus Pro Invoice Status Update</field>
<field name="active" eval="False" />
<field name="user_id" ref="base.user_root" />
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="model_id" ref="model_chorus_flow" />
<field name="state">code</field>
<field name="code">model.chorus_cron()</field>
</record>
<record id="chorus_partner_cron" model="ir.cron">
<field name="name">Chorus Pro Partner Update</field>
<field name="active" eval="False" />
<field name="user_id" ref="base.user_root" />
<field name="interval_number">1</field>
<field name="interval_type">weeks</field>
<field name="model_id" ref="base.model_res_partner" />
<field name="state">code</field>
<field name="code">model.chorus_cron()</field>
</record>
<record id="chorus_api_expiry_reminder_cron" model="ir.cron">
<field name="name">Chorus Pro API Expiry Reminder Email</field>
<field name="active" eval="False" />
<field name="user_id" ref="base.user_root" />
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="model_id" ref="base.model_res_company" />
<field name="state">code</field>
<field name="code">model.chorus_api_expiry_reminder_cron()</field>
</record>
</odoo>
36 changes: 36 additions & 0 deletions l10n_fr_chorus_account/data/mail_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2018-2021 Akretion France (http://www.akretion.com/)
@author Alexis de Lattre <alexis.delattre@akretion.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo noupdate="1">
<record id="chorus_api_expiry_reminder_mail_template" model="mail.template">
<field name="name">Chorus API Expiry Reminder</field>
<field name="model_id" ref="base.model_res_company" />
<field name="auto_delete" eval="False" />
<field name="lang">{{ object.partner_id.lang }}</field>
<field name="email_from">{{ object.email or 'odoo@example.com' }}</field>
<field name="email_to">{{object.chorus_expiry_remind_user_list() }}</field>
<field
name="subject"
>[{{ object.name }}] Action needed to continue to use the Chorus Pro API</field>
<field name="body_html" type="html">
<p>The Odoo server of company <em
t-out="object.name"
>My company</em> is configured to access the Chorus Pro API. Accessing the Chorus Pro API requires a technical user login and password. The password of the technical user has an expiry date. The password of the technical user expires on <strong
t-out="format_date(object.fr_chorus_pwd_expiry_date) or ''"
>08/08/2021</strong> (in <strong
t-out="ctx.get('pwd_days')"
>7</strong> days).</p>

<p
>In order to continue to access the Chorus Pro API without problems, you should connect to Chorus Pro, generate a new password for the technical user and copy it in Odoo on the accounting configuration page.</p>

<p>
-- <br />
Automatic e-mail sent by Odoo.
</p>
</field>
</record>
</odoo>
Loading
Loading