From 948e33b2da993498f488e66a2d3d78b1981ba018 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Tue, 26 Nov 2024 21:11:52 +0100 Subject: [PATCH] [ADD] module l10n_fr_siret_account Fixes #38 l10n_fr_siret: unrequired dependency on account This is now possible because l10n_fr doesn't depend on account anymore and there is a new official module l10n_fr_account that acts as a glue module between l10n_fr and account. --- l10n_fr_siret_account/README.rst | 86 ++++ l10n_fr_siret_account/__init__.py | 1 + l10n_fr_siret_account/__manifest__.py | 21 + l10n_fr_siret_account/models/__init__.py | 1 + l10n_fr_siret_account/models/res_partner.py | 12 + l10n_fr_siret_account/pyproject.toml | 3 + l10n_fr_siret_account/readme/CONTRIBUTORS.md | 1 + l10n_fr_siret_account/readme/DESCRIPTION.md | 3 + .../static/description/index.html | 427 ++++++++++++++++++ l10n_fr_siret_account/views/res_partner.xml | 53 +++ 10 files changed, 608 insertions(+) create mode 100644 l10n_fr_siret_account/README.rst create mode 100644 l10n_fr_siret_account/__init__.py create mode 100644 l10n_fr_siret_account/__manifest__.py create mode 100644 l10n_fr_siret_account/models/__init__.py create mode 100644 l10n_fr_siret_account/models/res_partner.py create mode 100644 l10n_fr_siret_account/pyproject.toml create mode 100644 l10n_fr_siret_account/readme/CONTRIBUTORS.md create mode 100644 l10n_fr_siret_account/readme/DESCRIPTION.md create mode 100644 l10n_fr_siret_account/static/description/index.html create mode 100644 l10n_fr_siret_account/views/res_partner.xml diff --git a/l10n_fr_siret_account/README.rst b/l10n_fr_siret_account/README.rst new file mode 100644 index 000000000..2372c8f6b --- /dev/null +++ b/l10n_fr_siret_account/README.rst @@ -0,0 +1,86 @@ +========================================== +French localization - SIRET and Accounting +========================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:75143cb099a5b864caf41f2d1f2fe2b4b0be61c29a95856625f9053922c03e71 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/18.0/l10n_fr_siret_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_siret_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 a glue module between the module ``account`` and the OCA module +``l10n_fr_siret``. This module will be automatically installed when both +the modules *account* and *l10n_fr_siret* are installed. + +**Table of contents** + +.. contents:: + :local: + +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Akretion + +Contributors +------------ + +- Alexis de Lattre + +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 `__: + +|maintainer-alexis-via| + +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/l10n_fr_siret_account/__init__.py b/l10n_fr_siret_account/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/l10n_fr_siret_account/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/l10n_fr_siret_account/__manifest__.py b/l10n_fr_siret_account/__manifest__.py new file mode 100644 index 000000000..636f5a209 --- /dev/null +++ b/l10n_fr_siret_account/__manifest__.py @@ -0,0 +1,21 @@ +# Copyright 2024 Akretion France (https://www.akretion.com/) +# @author: Alexis de Lattre +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "French localization - SIRET and Accounting", + "summary": "Glue module between l10n_fr_siret and account", + "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", "l10n_fr_account"], + "data": [ + "views/res_partner.xml", + ], + "installable": True, + "auto_install": True, + "development_status": "Mature", +} diff --git a/l10n_fr_siret_account/models/__init__.py b/l10n_fr_siret_account/models/__init__.py new file mode 100644 index 000000000..91fed54d4 --- /dev/null +++ b/l10n_fr_siret_account/models/__init__.py @@ -0,0 +1 @@ +from . import res_partner diff --git a/l10n_fr_siret_account/models/res_partner.py b/l10n_fr_siret_account/models/res_partner.py new file mode 100644 index 000000000..c89d508c3 --- /dev/null +++ b/l10n_fr_siret_account/models/res_partner.py @@ -0,0 +1,12 @@ +# Copyright 2024 Akretion France (http://www.akretion.com/) +# @author: Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ResPartner(models.Model): + _inherit = "res.partner" + + siren = fields.Char(tracking=50) + nic = fields.Char(tracking=51) diff --git a/l10n_fr_siret_account/pyproject.toml b/l10n_fr_siret_account/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/l10n_fr_siret_account/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/l10n_fr_siret_account/readme/CONTRIBUTORS.md b/l10n_fr_siret_account/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..b61afe5d0 --- /dev/null +++ b/l10n_fr_siret_account/readme/CONTRIBUTORS.md @@ -0,0 +1 @@ +- Alexis de Lattre \<\> diff --git a/l10n_fr_siret_account/readme/DESCRIPTION.md b/l10n_fr_siret_account/readme/DESCRIPTION.md new file mode 100644 index 000000000..154830e22 --- /dev/null +++ b/l10n_fr_siret_account/readme/DESCRIPTION.md @@ -0,0 +1,3 @@ +This is a glue module between the module `account` and the OCA module +`l10n_fr_siret`. This module will be automatically installed when both +the modules *account* and *l10n_fr_siret* are installed. diff --git a/l10n_fr_siret_account/static/description/index.html b/l10n_fr_siret_account/static/description/index.html new file mode 100644 index 000000000..f42982c3f --- /dev/null +++ b/l10n_fr_siret_account/static/description/index.html @@ -0,0 +1,427 @@ + + + + + +French localization - SIRET and Accounting + + + +
+

French localization - SIRET and Accounting

+ + +

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

+

This is a glue module between the module account and the OCA module +l10n_fr_siret. This module will be automatically installed when both +the modules account and l10n_fr_siret are installed.

+

Table of contents

+ +
+

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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Akretion
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +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.

+

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

+
+
+
+ + diff --git a/l10n_fr_siret_account/views/res_partner.xml b/l10n_fr_siret_account/views/res_partner.xml new file mode 100644 index 000000000..bf79c0e10 --- /dev/null +++ b/l10n_fr_siret_account/views/res_partner.xml @@ -0,0 +1,53 @@ + + + + + res.partner + + + + + 'FR' not in fiscal_country_codes or (not is_company and not parent_is_company) + + + 'FR' not in fiscal_country_codes or (not is_company and not parent_is_company) + + + 'FR' not in fiscal_country_codes or (not is_company and not parent_is_company) + + + + + + 'FR' not in fiscal_country_codes or type in ('contact', 'private') + + + 'FR' not in fiscal_country_codes or type in ('contact', 'private') + + + +