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

Fork l10n_fr ? #379

Closed
alexis-via opened this issue Oct 10, 2022 · 3 comments
Closed

Fork l10n_fr ? #379

alexis-via opened this issue Oct 10, 2022 · 3 comments
Labels

Comments

@alexis-via
Copy link
Contributor

The branch 14.0 of this project is red due to a huge change in the official module l10n_fr on October 7 odoo/odoo@85a634c
The commit landed in Odoo after the merge of this PR odoo/odoo#84918 made by Julien Van Roy, an employee of Odoo SA (https://www.linkedin.com/in/julien-van-roy-05a53a146/)

This commit broke l10n_fr_account_tax_unece because XMLIDs were changed on several taxes. As a consequence, the branch origin/14.0 is now red.

But the problem is no so much that the 14.0 branch of OCA/l10n-france turned red without notice ! The problem is that Odoo SA continued the crazy evolution on taxes: before this commit, l10n_fr created 54 taxes by default, which was already a lot... now there are 66 taxes by default ! In my tweet about this (https://twitter.com/alexisdlattre/status/1578514876573491200), I said I was thinking about forking l10n_fr.

In the past, some localization modules were forked:

I had some discussion today about this at the OCA code sprint in Liège with Stéphane Bidoula and Pedro. They both recommended not to fork the module l10n_fr module because:

  • they cannot warranty that, in the addons_path, l10n-france will be before odoo/addons, so there is no warranty that the forked l10n_fr will be used in Travis to get the branch back to green
  • the system that builds the python packages for pypi will not understand that there are 2 modules with the same name under 2 official/OCA projects

Another idea would be to have a module l10n_fr_oca that ships an alternative account.chart.template that would be named "Plan Comptable Général by OCA (France)". This module could depend on account_tax_unece and integrate the feature of l10n_fr_account_tax_unece. The problem is that l10n_fr is installed by default when you install the account module and the country of your company is France, cf init.py in the account module https://github.com/odoo/odoo/blob/14.0/addons/account/__init__.py#L45. I wanted to propose to modify this method in OCB to load l10n_xx_oca by default and, if it doesn't exist, load l10n_xx. There is also a second problem: l10n_fr creates a few fields (ape, siret, ...) and we should not have 2 modules that create the same fields and don't depend on each other. But, if l10n_fr_oca depend on l10n_fr, then l10n_fr is loaded first, so it is the chart of account of l10n_fr which is installed on the company. The solution I've used on the working prototype on my laptop is that l10n_fr_oca doesn't depend on l10n_fr and doesn't define any field, so l10n_fr_oca is loaded BEFORE l10n_fr, so the OCA chart of account is installed on the company. l10n_fr would be installed later, for example when you install l10n_fr_siret (l10n_fr_siret depend on l10n_fr) or any other OCA module that depend on l10n_fr.

What do you think ?

@dreispt
Copy link
Sponsor Member

dreispt commented Oct 11, 2022

Can you use a low "sequence" in your OCA module to ensure it loads before the Odoo one?

@alexis-via
Copy link
Contributor Author

Thinking about adding a module l10n_fr_oca and have it installed by default in OCB with OCA/OCB#1138

@alexis-via
Copy link
Contributor Author

Fork done: l10n_fr_oca!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants