Skip to content

Commit

Permalink
Merge PR #584 into 18.0
Browse files Browse the repository at this point in the history
Signed-off-by alexis-via
  • Loading branch information
OCA-git-bot committed Dec 20, 2024
2 parents 9842983 + b19448f commit 9a84a8f
Show file tree
Hide file tree
Showing 48 changed files with 4,569 additions and 0 deletions.
125 changes: 125 additions & 0 deletions l10n_fr_siret/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
===============================================
French company identity numbers SIRET/SIREN/NIC
===============================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a2e4cd4a60d9d80e401469486268f6eae9034c153440291868b70d0788b0c9e3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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
: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
: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|

The **l10n_fr** module from the official addons adds a *SIRET* field on
partners, but it doesn't verify its validity. This module
**l10n_fr_siret** adds several features:

- the validity of the SIRET is checked using its checksum.
- it adds **SIREN** and **NIC** fields (reminder: SIREN + NIC = SIRET).
If you enter the SIRET, these 2 fields are automatically computed
from SIRET.
- multi-site companies have a single SIREN and one SIRET per site i.e.
one NIC per site. This module allows to enter a specific NIC on child
partners.
- it adds a warning banner on the partner form view if another partner
has the same SIREN.

|image1|

.. |image1| image:: https://raw.githubusercontent.com/OCA/l10n-france/18.0/l10n_fr_siret/static/description/partner_duplicate_warning.png

**Table of contents**

.. contents::
:local:

Installation
============

It is recommended to install ``python-stdnum>=1.18`` to benefic for a
``specific bugfix <https://github.com/arthurdejong/python-stdnum/issues/291>``\ \_
on SIRET validation.

Usage
=====

On the Partner form, users will be able to enter: \* the SIREN and NIC
numbers: the SIRET number will be computed automatically. \* the SIRET
number: the SIREN and NIC will be computed automatically.

The last digits of the SIREN and NIC are control keys: Odoo will check
their validity.

The warning banner is displayed on the partner form view if another
partner: - has the same SIREN, - if the partner is attached to a
specific company: is in the same company or is not attached to a
specific company, - if the partner is not attached to a specific
company: is in any company or not attached to a specific company.

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_siret%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
-------

* Numérigraphe
* Akretion

Contributors
------------

- Lionel Sausin (Numérigraphe) <[email protected]>
- Alexis de Lattre <[email protected]>

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_siret>`_ 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_siret/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from .post_install import set_siren_nic
25 changes: 25 additions & 0 deletions l10n_fr_siret/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2011-2022 Numérigraphe SARL.
# Copyright 2014-2022 Akretion France
# @author: Alexis de Lattre <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "French company identity numbers SIRET/SIREN/NIC",
"summary": "Complete support for SIRET/SIREN/NIC with checksum validation",
"version": "18.0.1.0.0",
"category": "French Localization",
"author": "Numérigraphe,Akretion,Odoo Community Association (OCA)",
"maintainers": ["alexis-via"],
"website": "https://github.com/OCA/l10n-france",
"license": "AGPL-3",
"depends": ["l10n_fr", "base_view_inheritance_extension"],
"external_dependencies": {"python": ["python-stdnum"]},
"data": [
"views/res_partner.xml",
"views/res_company.xml",
],
"demo": ["demo/partner_demo.xml"],
"post_init_hook": "set_siren_nic",
"installable": True,
"development_status": "Mature",
}
19 changes: 19 additions & 0 deletions l10n_fr_siret/demo/partner_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2014-2021 Akretion France
@author: Alexis de Lattre <[email protected]>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo noupdate="1">
<record id="c2c_france" model="res.partner">
<field name="name">Camptocamp France SAS</field>
<field name="is_company" eval="True" />
<field name="street">18 rue du Lac Saint André</field>
<field name="zip">73370</field>
<field name="city">Le Bourget-du-Lac</field>
<field name="country_id" ref="base.fr" />
<field name="website">https://www.camptocamp.com/</field>
<field name="siren">433698578</field>
<field name="nic">00054</field>
</record>
</odoo>
152 changes: 152 additions & 0 deletions l10n_fr_siret/i18n/bg.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_fr_siret
#
# Translators:
# OCA Transbot <[email protected]>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-17 03:38+0000\n"
"PO-Revision-Date: 2017-01-17 03:38+0000\n"
"Last-Translator: OCA Transbot <[email protected]>, 2017\n"
"Language-Team: Bulgarian (https://www.transifex.com/oca/teams/23907/bg/)\n"
"Language: bg\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: l10n_fr_siret
#: model:ir.model.fields,help:l10n_fr_siret.field_res_partner__parent_is_company
#: model:ir.model.fields,help:l10n_fr_siret.field_res_users__parent_is_company
msgid "Check if the contact is a company, otherwise it is a person"
msgstr ""

#. module: l10n_fr_siret
#: model:ir.model,name:l10n_fr_siret.model_res_company
msgid "Companies"
msgstr ""

#. module: l10n_fr_siret
#: model:ir.model,name:l10n_fr_siret.model_res_partner
msgid "Contact"
msgstr ""

#. module: l10n_fr_siret
#: model_terms:ir.ui.view,arch_db:l10n_fr_siret.res_partner_form_l10n_fr
msgid "Duplicate warning: partner"
msgstr ""

#. module: l10n_fr_siret
#: model:ir.model.fields,field_description:l10n_fr_siret.field_res_company__nic
#: model:ir.model.fields,field_description:l10n_fr_siret.field_res_partner__nic
#: model:ir.model.fields,field_description:l10n_fr_siret.field_res_users__nic
msgid "NIC"
msgstr ""

#. module: l10n_fr_siret
#: model:ir.model.fields,field_description:l10n_fr_siret.field_res_partner__parent_is_company
#: model:ir.model.fields,field_description:l10n_fr_siret.field_res_users__parent_is_company
msgid "Parent is a Company"
msgstr ""

#. module: l10n_fr_siret
#: model:ir.model.fields,field_description:l10n_fr_siret.field_res_partner__same_siren_partner_id
#: model:ir.model.fields,field_description:l10n_fr_siret.field_res_users__same_siren_partner_id
msgid "Partner with same SIREN"
msgstr ""

#. module: l10n_fr_siret
#: model:ir.model.fields,field_description:l10n_fr_siret.field_res_company__siren
#: model:ir.model.fields,field_description:l10n_fr_siret.field_res_partner__siren
#: model:ir.model.fields,field_description:l10n_fr_siret.field_res_users__siren
msgid "SIREN"
msgstr ""

#. module: l10n_fr_siret
#: model:ir.model.fields,field_description:l10n_fr_siret.field_res_company__siret
#: model:ir.model.fields,field_description:l10n_fr_siret.field_res_partner__siret
#: model:ir.model.fields,field_description:l10n_fr_siret.field_res_users__siret
msgid "SIRET"
msgstr ""

#. module: l10n_fr_siret
#. odoo-python
#: code:addons/l10n_fr_siret/models/res_partner.py:0
#, python-format
msgid "SIRET '%s' is invalid."
msgstr ""

#. module: l10n_fr_siret
#. odoo-python
#: code:addons/l10n_fr_siret/models/res_partner.py:0
#, python-format
msgid ""
"The NIC '{nic}' of partner '{partner_name}' is incorrect: it must have "
"exactly 5 digits."
msgstr ""

#. module: l10n_fr_siret
#: model:ir.model.fields,help:l10n_fr_siret.field_res_company__nic
#: model:ir.model.fields,help:l10n_fr_siret.field_res_partner__nic
#: model:ir.model.fields,help:l10n_fr_siret.field_res_users__nic
msgid ""
"The NIC number is the official rank number of this office in the company in "
"France. It composes the last 5 digits of the SIRET number."
msgstr ""

#. module: l10n_fr_siret
#. odoo-python
#: code:addons/l10n_fr_siret/models/res_partner.py:0
#, python-format
msgid ""
"The SIREN '{siren}' of partner '{partner_name}' is incorrect: it must have "
"exactly 9 digits."
msgstr ""

#. module: l10n_fr_siret
#. odoo-python
#: code:addons/l10n_fr_siret/models/res_partner.py:0
#, python-format
msgid ""
"The SIREN '{siren}' of partner '{partner_name}' is invalid: the checksum is "
"wrong."
msgstr ""

#. module: l10n_fr_siret
#: model:ir.model.fields,help:l10n_fr_siret.field_res_company__siren
#: model:ir.model.fields,help:l10n_fr_siret.field_res_partner__siren
#: model:ir.model.fields,help:l10n_fr_siret.field_res_users__siren
msgid ""
"The SIREN number is the official identity number of the company in France. "
"It composes the first 9 digits of the SIRET number."
msgstr ""

#. module: l10n_fr_siret
#. odoo-python
#: code:addons/l10n_fr_siret/models/res_partner.py:0
#, python-format
msgid ""
"The SIRET '{siret}' of partner '{partner_name}' is invalid: the checksum is "
"wrong."
msgstr ""

#. module: l10n_fr_siret
#: model:ir.model.fields,help:l10n_fr_siret.field_res_company__siret
#: model:ir.model.fields,help:l10n_fr_siret.field_res_partner__siret
#: model:ir.model.fields,help:l10n_fr_siret.field_res_users__siret
msgid ""
"The SIRET number is the official identity number of this company's office in "
"France. It is composed of the 9 digits of the SIREN number and the 5 digits "
"of the NIC number, ie. 14 digits."
msgstr ""

#. module: l10n_fr_siret
#: model_terms:ir.ui.view,arch_db:l10n_fr_siret.res_partner_form_l10n_fr
msgid "has the same <b>SIREN</b>."
msgstr ""

#~ msgid "Partner"
#~ msgstr "Партньор"
Loading

0 comments on commit 9a84a8f

Please sign in to comment.