From 38e060a777e947fa871f5caf990ef88af1d089ac Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Thu, 30 Jan 2025 23:35:45 +0100 Subject: [PATCH] [IMP] account_banking_fr_lcr: pre-commit fixes --- account_banking_fr_lcr/README.rst | 83 ++++++++++++------- account_banking_fr_lcr/__manifest__.py | 2 +- account_banking_fr_lcr/models/account_move.py | 7 +- .../models/account_payment_mode.py | 3 +- .../models/account_payment_order.py | 9 +- account_banking_fr_lcr/pyproject.toml | 3 + account_banking_fr_lcr/readme/CONFIGURE.md | 13 +++ account_banking_fr_lcr/readme/CONFIGURE.rst | 10 --- account_banking_fr_lcr/readme/CONTRIBUTORS.md | 1 + .../readme/CONTRIBUTORS.rst | 1 - account_banking_fr_lcr/readme/DESCRIPTION.md | 21 +++++ account_banking_fr_lcr/readme/DESCRIPTION.rst | 14 ---- account_banking_fr_lcr/readme/INSTALL.md | 10 +++ account_banking_fr_lcr/readme/INSTALL.rst | 6 -- account_banking_fr_lcr/readme/USAGE.md | 18 ++++ account_banking_fr_lcr/readme/USAGE.rst | 9 -- .../static/description/index.html | 66 ++++++++++----- account_banking_fr_lcr/views/account_move.xml | 2 +- .../views/account_payment_mode.xml | 2 - .../views/account_payment_order.xml | 11 ++- requirements.txt | 2 + 21 files changed, 185 insertions(+), 108 deletions(-) create mode 100644 account_banking_fr_lcr/pyproject.toml create mode 100644 account_banking_fr_lcr/readme/CONFIGURE.md delete mode 100644 account_banking_fr_lcr/readme/CONFIGURE.rst create mode 100644 account_banking_fr_lcr/readme/CONTRIBUTORS.md delete mode 100644 account_banking_fr_lcr/readme/CONTRIBUTORS.rst create mode 100644 account_banking_fr_lcr/readme/DESCRIPTION.md delete mode 100644 account_banking_fr_lcr/readme/DESCRIPTION.rst create mode 100644 account_banking_fr_lcr/readme/INSTALL.md delete mode 100644 account_banking_fr_lcr/readme/INSTALL.rst create mode 100644 account_banking_fr_lcr/readme/USAGE.md delete mode 100644 account_banking_fr_lcr/readme/USAGE.rst diff --git a/account_banking_fr_lcr/README.rst b/account_banking_fr_lcr/README.rst index fe9b57566..c165caa8c 100644 --- a/account_banking_fr_lcr/README.rst +++ b/account_banking_fr_lcr/README.rst @@ -17,31 +17,38 @@ French Letter of Change :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/account_banking_fr_lcr + :target: https://github.com/OCA/l10n-france/tree/18.0/account_banking_fr_lcr :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-account_banking_fr_lcr + :target: https://translation.odoo-community.org/projects/l10n-france-18-0/l10n-france-18-0-account_banking_fr_lcr :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 + :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 module adds support for French Letters of Change. This module supports: +This module adds support for French Letters of Change. This module +supports: -* **Direct letter of change** (in French : *Lettre de change directe* or *LCR directe*), -* **Accepted letter of change** (in French : *Lettre de change acceptée* ; I call it *paper letter of change*), -* **Promissory note** (in French : *Billet à ordre*), +- **Direct letter of change** (in French : *Lettre de change directe* + or *LCR directe*), +- **Accepted letter of change** (in French : *Lettre de change + acceptée* ; I call it *paper letter of change*), +- **Promissory note** (in French : *Billet à ordre*), It supports cash discounts debit orders and Dailly convention. This module has 2 main features: -* for **Accepted Letter of Change**, generate a paper letter of change as PDF following the official layout NF K 11-030-1. -* generate of LCR (or BOR) CFONB files to send to your bank. +- for **Accepted Letter of Change**, generate a paper letter of change + as PDF following the official layout NF K 11-030-1. +- generate of LCR (or BOR) CFONB files to send to your bank. -This module follows the specifications published on the `CFONB website `_, section *Espace documentaire > Instruments de paiement > Effet de commerce* (document version of September 2002). +This module follows the specifications published on the `CFONB +website `__, section *Espace documentaire > +Instruments de paiement > Effet de commerce* (document version of +September 2002). **Table of contents** @@ -53,10 +60,14 @@ Installation This module requires 2 Python libs: -* `pypdf `_ version 3.10 or above, -* `unidecode `_ (any version). +- `pypdf `__ version 3.10 or above, +- `unidecode `__ (any version). -In order to have the SIREN of the company and of the customer set in the CFONB file (optional field) and printed on the paper letter of exchange, the OCA module **l10n_fr_siret** must be installed. The installation of the module **l10n_fr_siret** is optional (because the SIREN field in the CFONB file is optional). +In order to have the SIREN of the company and of the customer set in the +CFONB file (optional field) and printed on the paper letter of exchange, +the OCA module **l10n_fr_siret** must be installed. The installation of +the module **l10n_fr_siret** is optional (because the SIREN field in the +CFONB file is optional). Configuration ============= @@ -65,25 +76,37 @@ To configure this module, you need to create a new payment mode linked to the payment method *Lettre de Change Relevé* that is automatically created when you install this module. -Once you selected this payment method, you will have a new section *Bill of Exchange* on the payment mode where you will have to configure: +Once you selected this payment method, you will have a new section *Bill +of Exchange* on the payment mode where you will have to configure: -* the *LCR type*: *Lettre de change non acceptée (LCR directe)*, *Lettre de change acceptée* or *Billet à ordre*, -* the *Default Collection Option*, -* if you have a *Dailly Convention*, -* in case you have a Dailly convention, you will be able to configure the *Default Dailly Option* and the *Convention Type*. +- the *LCR type*: *Lettre de change non acceptée (LCR directe)*, + *Lettre de change acceptée* or *Billet à ordre*, +- the *Default Collection Option*, +- if you have a *Dailly Convention*, +- in case you have a Dailly convention, you will be able to configure + the *Default Dailly Option* and the *Convention Type*. Usage ===== -This module adds a new field *Bill of Exchange Bank Account* on customer invoices to select the bank account of the customer that will be debited by the letter of exchange. This bank account must be a french IBAN. +This module adds a new field *Bill of Exchange Bank Account* on customer +invoices to select the bank account of the customer that will be debited +by the letter of exchange. This bank account must be a french IBAN. -If you configured the payment mode for **Accepted Letter of Change**, you will have a button *Print Bill of Exchange* on customer invoices to get the letter of change as PDF. +If you configured the payment mode for **Accepted Letter of Change**, +you will have a button *Print Bill of Exchange* on customer invoices to +get the letter of change as PDF. -This module uses the standard workflow of debit orders as implemented in the OCA module **account_payment_order**. A debit order linked to a payment mode with the payment method *Lettre de change relevé* has a few additionnal constraints: +This module uses the standard workflow of debit orders as implemented in +the OCA module **account_payment_order**. A debit order linked to a +payment mode with the payment method *Lettre de change relevé* has a few +additionnal constraints: -* all payment lines must be in euro currency, -* the bank accounts on the payment lines must be french IBANs, -* if the payment order is configured with cash discount, you must configure the value date on the payment order (new field added by this module). +- all payment lines must be in euro currency, +- the bank accounts on the payment lines must be french IBANs, +- if the payment order is configured with cash discount, you must + configure the value date on the payment order (new field added by + this module). Bug Tracker =========== @@ -91,7 +114,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -99,17 +122,17 @@ Credits ======= Authors -~~~~~~~ +------- * Akretion Contributors -~~~~~~~~~~~~ +------------ -* Alexis de Lattre +- Alexis de Lattre Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -129,6 +152,6 @@ Current `maintainer `__: |maintainer-alexis-via| -This module is part of the `OCA/l10n-france `_ project on GitHub. +This module is part of the `OCA/l10n-france `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_banking_fr_lcr/__manifest__.py b/account_banking_fr_lcr/__manifest__.py index c96f5d007..33f0be8bf 100644 --- a/account_banking_fr_lcr/__manifest__.py +++ b/account_banking_fr_lcr/__manifest__.py @@ -6,7 +6,7 @@ { "name": "French Letter of Change", "summary": "Create French LCR CFONB files", - "version": "16.0.1.0.0", + "version": "18.0.1.0.0", "license": "AGPL-3", "author": "Akretion,Odoo Community Association (OCA)", "maintainers": ["alexis-via"], diff --git a/account_banking_fr_lcr/models/account_move.py b/account_banking_fr_lcr/models/account_move.py index a0b5146e3..6bf7e3539 100644 --- a/account_banking_fr_lcr/models/account_move.py +++ b/account_banking_fr_lcr/models/account_move.py @@ -19,7 +19,7 @@ try: from pypdf import PdfReader, PdfWriter -except (ImportError, IOError) as err: +except (OSError, ImportError) as err: logger.debug(err) @@ -81,7 +81,8 @@ def _post(self, soft=True): for move in self: if move.move_type == "out_invoice" and move.payment_method_code == "fr_lcr": # We consider bank account as required only for letter of change, - # not for promissory note (we may only know the bank account when receiving it) + # not for promissory note (we may only know the bank account when + # receiving it) if ( move.payment_mode_fr_lcr_type in ("accepted", "not_accepted") and not move.fr_lcr_partner_bank_id @@ -278,7 +279,7 @@ def fr_lcr_generate_attachment(self): final_report_writer.write(final_report_io) final_report_bytes = final_report_io.getvalue() - filename = "lettre_de_change-%s.pdf" % self.name.replace("/", "-") + filename = f"lettre_de_change-{self.name.replace('/', '-')}.pdf" attach = self.env["ir.attachment"].create( { "name": filename, diff --git a/account_banking_fr_lcr/models/account_payment_mode.py b/account_banking_fr_lcr/models/account_payment_mode.py index feaa8de77..cc4577ace 100644 --- a/account_banking_fr_lcr/models/account_payment_mode.py +++ b/account_banking_fr_lcr/models/account_payment_mode.py @@ -87,7 +87,8 @@ def _check_fr_lcr(self): ): raise ValidationError( _( - "The field 'Bill of Exchange Type' must be set on payment mode '%s'." + "The field 'Bill of Exchange Type' must be set on " + "payment mode '%s'." ) % mode.display_name ) diff --git a/account_banking_fr_lcr/models/account_payment_order.py b/account_banking_fr_lcr/models/account_payment_order.py index 9039a2ceb..06d2d283d 100644 --- a/account_banking_fr_lcr/models/account_payment_order.py +++ b/account_banking_fr_lcr/models/account_payment_order.py @@ -51,7 +51,8 @@ class AccountPaymentOrder(models.Model): states={"draft": [("readonly", False)]}, string="Collection Option", ) - # if fr_lcr_value_date is also used for Dailly, we'll have to change the code and the view + # if fr_lcr_value_date is also used for Dailly, we'll have to change + # the code and the view fr_lcr_value_date = fields.Date(string="Value Date") # invisible, to show or not the field 'fr_lcr_dailly_option' fr_lcr_dailly = fields.Boolean( @@ -91,7 +92,6 @@ def draft2open(self): # on account.payment.line res = super().draft2open() today = fields.Date.context_today(self) - self.env.ref("base.EUR").id for order in self: if order.payment_method_code == "fr_lcr": if not order.fr_lcr_collection_option: @@ -266,8 +266,9 @@ def _prepare_final_cfonb_line(self, total_amount, transactions_count): return cfonb_line def _fr_lcr_line_separator(self): - """It seems that some bank don't want a line break. For the moment, we have this hook. - If it is confirm, we'll make it a configuration parameter""" + """It seems that some bank don't want a line break. For the moment, + we have this hook. If it is confirm, we'll make it a configuration parameter + """ return "\r\n" def generate_payment_file(self): diff --git a/account_banking_fr_lcr/pyproject.toml b/account_banking_fr_lcr/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/account_banking_fr_lcr/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/account_banking_fr_lcr/readme/CONFIGURE.md b/account_banking_fr_lcr/readme/CONFIGURE.md new file mode 100644 index 000000000..0876228e7 --- /dev/null +++ b/account_banking_fr_lcr/readme/CONFIGURE.md @@ -0,0 +1,13 @@ +To configure this module, you need to create a new payment mode linked +to the payment method *Lettre de Change Relevé* that is automatically +created when you install this module. + +Once you selected this payment method, you will have a new section *Bill +of Exchange* on the payment mode where you will have to configure: + +- the *LCR type*: *Lettre de change non acceptée (LCR directe)*, *Lettre + de change acceptée* or *Billet à ordre*, +- the *Default Collection Option*, +- if you have a *Dailly Convention*, +- in case you have a Dailly convention, you will be able to configure + the *Default Dailly Option* and the *Convention Type*. diff --git a/account_banking_fr_lcr/readme/CONFIGURE.rst b/account_banking_fr_lcr/readme/CONFIGURE.rst deleted file mode 100644 index dfe26bea0..000000000 --- a/account_banking_fr_lcr/readme/CONFIGURE.rst +++ /dev/null @@ -1,10 +0,0 @@ -To configure this module, you need to create a new payment mode linked -to the payment method *Lettre de Change Relevé* that is automatically -created when you install this module. - -Once you selected this payment method, you will have a new section *Bill of Exchange* on the payment mode where you will have to configure: - -* the *LCR type*: *Lettre de change non acceptée (LCR directe)*, *Lettre de change acceptée* or *Billet à ordre*, -* the *Default Collection Option*, -* if you have a *Dailly Convention*, -* in case you have a Dailly convention, you will be able to configure the *Default Dailly Option* and the *Convention Type*. diff --git a/account_banking_fr_lcr/readme/CONTRIBUTORS.md b/account_banking_fr_lcr/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..b61afe5d0 --- /dev/null +++ b/account_banking_fr_lcr/readme/CONTRIBUTORS.md @@ -0,0 +1 @@ +- Alexis de Lattre \<\> diff --git a/account_banking_fr_lcr/readme/CONTRIBUTORS.rst b/account_banking_fr_lcr/readme/CONTRIBUTORS.rst deleted file mode 100644 index ff65d68ce..000000000 --- a/account_banking_fr_lcr/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1 +0,0 @@ -* Alexis de Lattre diff --git a/account_banking_fr_lcr/readme/DESCRIPTION.md b/account_banking_fr_lcr/readme/DESCRIPTION.md new file mode 100644 index 000000000..5ec7fd23a --- /dev/null +++ b/account_banking_fr_lcr/readme/DESCRIPTION.md @@ -0,0 +1,21 @@ +This module adds support for French Letters of Change. This module +supports: + +- **Direct letter of change** (in French : *Lettre de change directe* or + *LCR directe*), +- **Accepted letter of change** (in French : *Lettre de change acceptée* + ; I call it *paper letter of change*), +- **Promissory note** (in French : *Billet à ordre*), + +It supports cash discounts debit orders and Dailly convention. + +This module has 2 main features: + +- for **Accepted Letter of Change**, generate a paper letter of change + as PDF following the official layout NF K 11-030-1. +- generate of LCR (or BOR) CFONB files to send to your bank. + +This module follows the specifications published on the [CFONB +website](https://www.cfonb.org/), section *Espace documentaire \> +Instruments de paiement \> Effet de commerce* (document version of +September 2002). diff --git a/account_banking_fr_lcr/readme/DESCRIPTION.rst b/account_banking_fr_lcr/readme/DESCRIPTION.rst deleted file mode 100644 index 392addab6..000000000 --- a/account_banking_fr_lcr/readme/DESCRIPTION.rst +++ /dev/null @@ -1,14 +0,0 @@ -This module adds support for French Letters of Change. This module supports: - -* **Direct letter of change** (in French : *Lettre de change directe* or *LCR directe*), -* **Accepted letter of change** (in French : *Lettre de change acceptée* ; I call it *paper letter of change*), -* **Promissory note** (in French : *Billet à ordre*), - -It supports cash discounts debit orders and Dailly convention. - -This module has 2 main features: - -* for **Accepted Letter of Change**, generate a paper letter of change as PDF following the official layout NF K 11-030-1. -* generate of LCR (or BOR) CFONB files to send to your bank. - -This module follows the specifications published on the `CFONB website `_, section *Espace documentaire > Instruments de paiement > Effet de commerce* (document version of September 2002). diff --git a/account_banking_fr_lcr/readme/INSTALL.md b/account_banking_fr_lcr/readme/INSTALL.md new file mode 100644 index 000000000..f4398c05f --- /dev/null +++ b/account_banking_fr_lcr/readme/INSTALL.md @@ -0,0 +1,10 @@ +This module requires 2 Python libs: + +- [pypdf](https://pypi.org/project/pypdf/) version 3.10 or above, +- [unidecode](https://pypi.org/project/Unidecode/) (any version). + +In order to have the SIREN of the company and of the customer set in the +CFONB file (optional field) and printed on the paper letter of exchange, +the OCA module **l10n_fr_siret** must be installed. The installation of +the module **l10n_fr_siret** is optional (because the SIREN field in the +CFONB file is optional). diff --git a/account_banking_fr_lcr/readme/INSTALL.rst b/account_banking_fr_lcr/readme/INSTALL.rst deleted file mode 100644 index 1cc815f1b..000000000 --- a/account_banking_fr_lcr/readme/INSTALL.rst +++ /dev/null @@ -1,6 +0,0 @@ -This module requires 2 Python libs: - -* `pypdf `_ version 3.10 or above, -* `unidecode `_ (any version). - -In order to have the SIREN of the company and of the customer set in the CFONB file (optional field) and printed on the paper letter of exchange, the OCA module **l10n_fr_siret** must be installed. The installation of the module **l10n_fr_siret** is optional (because the SIREN field in the CFONB file is optional). diff --git a/account_banking_fr_lcr/readme/USAGE.md b/account_banking_fr_lcr/readme/USAGE.md new file mode 100644 index 000000000..ea7a2df4a --- /dev/null +++ b/account_banking_fr_lcr/readme/USAGE.md @@ -0,0 +1,18 @@ +This module adds a new field *Bill of Exchange Bank Account* on customer +invoices to select the bank account of the customer that will be debited +by the letter of exchange. This bank account must be a french IBAN. + +If you configured the payment mode for **Accepted Letter of Change**, +you will have a button *Print Bill of Exchange* on customer invoices to +get the letter of change as PDF. + +This module uses the standard workflow of debit orders as implemented in +the OCA module **account_payment_order**. A debit order linked to a +payment mode with the payment method *Lettre de change relevé* has a few +additionnal constraints: + +- all payment lines must be in euro currency, +- the bank accounts on the payment lines must be french IBANs, +- if the payment order is configured with cash discount, you must + configure the value date on the payment order (new field added by this + module). diff --git a/account_banking_fr_lcr/readme/USAGE.rst b/account_banking_fr_lcr/readme/USAGE.rst deleted file mode 100644 index 25354933e..000000000 --- a/account_banking_fr_lcr/readme/USAGE.rst +++ /dev/null @@ -1,9 +0,0 @@ -This module adds a new field *Bill of Exchange Bank Account* on customer invoices to select the bank account of the customer that will be debited by the letter of exchange. This bank account must be a french IBAN. - -If you configured the payment mode for **Accepted Letter of Change**, you will have a button *Print Bill of Exchange* on customer invoices to get the letter of change as PDF. - -This module uses the standard workflow of debit orders as implemented in the OCA module **account_payment_order**. A debit order linked to a payment mode with the payment method *Lettre de change relevé* has a few additionnal constraints: - -* all payment lines must be in euro currency, -* the bank accounts on the payment lines must be french IBANs, -* if the payment order is configured with cash discount, you must configure the value date on the payment order (new field added by this module). diff --git a/account_banking_fr_lcr/static/description/index.html b/account_banking_fr_lcr/static/description/index.html index 52ea2fc0e..8887339b9 100644 --- a/account_banking_fr_lcr/static/description/index.html +++ b/account_banking_fr_lcr/static/description/index.html @@ -8,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -274,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -300,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -368,20 +369,27 @@

French Letter of Change

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:cc2dfe4e4e92e172fa75427250ce7cf014a641c59a87e572cd9733e71c65b408 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/l10n-france Translate me on Weblate Try me on Runboat

-

This module adds support for French Letters of Change. This module supports:

+

Beta License: AGPL-3 OCA/l10n-france Translate me on Weblate Try me on Runboat

+

This module adds support for French Letters of Change. This module +supports:

    -
  • Direct letter of change (in French : Lettre de change directe or LCR directe),
  • -
  • Accepted letter of change (in French : Lettre de change acceptée ; I call it paper letter of change),
  • +
  • Direct letter of change (in French : Lettre de change directe +or LCR directe),
  • +
  • Accepted letter of change (in French : Lettre de change +acceptée ; I call it paper letter of change),
  • Promissory note (in French : Billet à ordre),

It supports cash discounts debit orders and Dailly convention.

This module has 2 main features:

    -
  • for Accepted Letter of Change, generate a paper letter of change as PDF following the official layout NF K 11-030-1.
  • +
  • for Accepted Letter of Change, generate a paper letter of change +as PDF following the official layout NF K 11-030-1.
  • generate of LCR (or BOR) CFONB files to send to your bank.
-

This module follows the specifications published on the CFONB website, section Espace documentaire > Instruments de paiement > Effet de commerce (document version of September 2002).

+

This module follows the specifications published on the CFONB +website, section Espace documentaire > +Instruments de paiement > Effet de commerce (document version of +September 2002).

Table of contents

-

In order to have the SIREN of the company and of the customer set in the CFONB file (optional field) and printed on the paper letter of exchange, the OCA module l10n_fr_siret must be installed. The installation of the module l10n_fr_siret is optional (because the SIREN field in the CFONB file is optional).

+

In order to have the SIREN of the company and of the customer set in the +CFONB file (optional field) and printed on the paper letter of exchange, +the OCA module l10n_fr_siret must be installed. The installation of +the module l10n_fr_siret is optional (because the SIREN field in the +CFONB file is optional).

Configuration

To configure this module, you need to create a new payment mode linked to the payment method Lettre de Change Relevé that is automatically created when you install this module.

-

Once you selected this payment method, you will have a new section Bill of Exchange on the payment mode where you will have to configure:

+

Once you selected this payment method, you will have a new section Bill +of Exchange on the payment mode where you will have to configure:

    -
  • the LCR type: Lettre de change non acceptée (LCR directe), Lettre de change acceptée or Billet à ordre,
  • +
  • the LCR type: Lettre de change non acceptée (LCR directe), +Lettre de change acceptée or Billet à ordre,
  • the Default Collection Option,
  • if you have a Dailly Convention,
  • -
  • in case you have a Dailly convention, you will be able to configure the Default Dailly Option and the Convention Type.
  • +
  • in case you have a Dailly convention, you will be able to configure +the Default Dailly Option and the Convention Type.

Usage

-

This module adds a new field Bill of Exchange Bank Account on customer invoices to select the bank account of the customer that will be debited by the letter of exchange. This bank account must be a french IBAN.

-

If you configured the payment mode for Accepted Letter of Change, you will have a button Print Bill of Exchange on customer invoices to get the letter of change as PDF.

-

This module uses the standard workflow of debit orders as implemented in the OCA module account_payment_order. A debit order linked to a payment mode with the payment method Lettre de change relevé has a few additionnal constraints:

+

This module adds a new field Bill of Exchange Bank Account on customer +invoices to select the bank account of the customer that will be debited +by the letter of exchange. This bank account must be a french IBAN.

+

If you configured the payment mode for Accepted Letter of Change, +you will have a button Print Bill of Exchange on customer invoices to +get the letter of change as PDF.

+

This module uses the standard workflow of debit orders as implemented in +the OCA module account_payment_order. A debit order linked to a +payment mode with the payment method Lettre de change relevé has a few +additionnal constraints:

  • all payment lines must be in euro currency,
  • the bank accounts on the payment lines must be french IBANs,
  • -
  • if the payment order is configured with cash discount, you must configure the value date on the payment order (new field added by this module).
  • +
  • if the payment order is configured with cash discount, you must +configure the value date on the payment order (new field added by +this module).
@@ -435,7 +459,7 @@

Bug Tracker

Bugs are tracked on GitHub 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.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -455,13 +479,15 @@

Contributors

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +Odoo Community Association +

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.

Current maintainer:

alexis-via

-

This module is part of the OCA/l10n-france project on GitHub.

+

This module is part of the OCA/l10n-france project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/account_banking_fr_lcr/views/account_move.xml b/account_banking_fr_lcr/views/account_move.xml index 985e866b9..6bd8f211c 100644 --- a/account_banking_fr_lcr/views/account_move.xml +++ b/account_banking_fr_lcr/views/account_move.xml @@ -19,7 +19,7 @@ /> - + - fr_lcr.account.payment.mode.form account.payment.mode @@ -38,5 +37,4 @@ - diff --git a/account_banking_fr_lcr/views/account_payment_order.xml b/account_banking_fr_lcr/views/account_payment_order.xml index d46f6c58c..112b1283a 100644 --- a/account_banking_fr_lcr/views/account_payment_order.xml +++ b/account_banking_fr_lcr/views/account_payment_order.xml @@ -13,21 +13,20 @@ /> - - - - + - - + diff --git a/requirements.txt b/requirements.txt index ad27c735e..417f86cfa 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,5 @@ # generated from manifests external_dependencies pyfrdas2>=0.5 +pypdf>=3.1.0 python-stdnum +unidecode