Skip to content

Commit

Permalink
Merge PR #378 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by dreispt
  • Loading branch information
OCA-git-bot committed Dec 2, 2023
2 parents 0e2c0fd + ef9f29f commit 37e3317
Show file tree
Hide file tree
Showing 18 changed files with 944 additions and 0 deletions.
100 changes: 100 additions & 0 deletions l10n_nl_oin/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
=====================================
Organisatie-identificatienummer (OIN)
=====================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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--netherlands-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-netherlands/tree/14.0/l10n_nl_oin
:alt: OCA/l10n-netherlands
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-netherlands-14-0/l10n-netherlands-14-0-l10n_nl_oin
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/176/14.0
:alt: Try me on Runbot

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

This module validates the Dutch `Organisatie-identificatienummer (OIN)` field
on partner forms.

The field is visible when the field ``company_type`` is set to ``Company``
and when the Country is ``The Netherlands``.

A double check on the OIN is done when inserting/modifying its value:

- validation of the OIN (check whether the format is correct);
- check if another partner with the same OIN already exists.

In both cases, a non-blocking alert is shown.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

* Open a form of a contact: flag Company must be checked (flag "Individual" must be unchecked)
* Enter the OIN number

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-netherlands/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-netherlands/issues/new?body=module:%20l10n_nl_oin%0Aversion:%2014.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
~~~~~~~

* Onestein

Contributors
~~~~~~~~~~~~

* Andrea Stirpe <[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-astirpe| image:: https://github.com/astirpe.png?size=40px
:target: https://github.com/astirpe
:alt: astirpe

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-astirpe|

This module is part of the `OCA/l10n-netherlands <https://github.com/OCA/l10n-netherlands/tree/14.0/l10n_nl_oin>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions l10n_nl_oin/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
15 changes: 15 additions & 0 deletions l10n_nl_oin/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Organisatie-identificatienummer (OIN)",
"version": "15.0.1.0.0",
"category": "Dutch Localization",
"license": "AGPL-3",
"summary": "Adds Dutch OIN field",
"author": "Onestein, Odoo Community Association (OCA)",
"maintainers": ["astirpe"],
"website": "https://github.com/OCA/l10n-netherlands",
"depends": ["l10n_nl"],
"installable": True,
}
71 changes: 71 additions & 0 deletions l10n_nl_oin/i18n/l10n_nl_oin.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_nl_oin
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: l10n_nl_oin
#: code:addons/l10n_nl_oin/models/res_partner.py:0
#, python-format
msgid "Another partner (%s) has the same OIN (%s)."
msgstr ""

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

#. module: l10n_nl_oin
#: model:ir.model.fields,field_description:l10n_nl_oin.field_res_partner__display_name
msgid "Display Name"
msgstr ""

#. module: l10n_nl_oin
#: model:ir.model.fields,field_description:l10n_nl_oin.field_res_partner__nl_oin
#: model:ir.model.fields,field_description:l10n_nl_oin.field_res_users__nl_oin
msgid "Dutch OIN"
msgstr ""

#. module: l10n_nl_oin
#: model:ir.model.fields,help:l10n_nl_oin.field_res_partner__nl_oin
#: model:ir.model.fields,help:l10n_nl_oin.field_res_users__nl_oin
msgid "Dutch Organisatie-identificatienummer (OIN)"
msgstr ""

#. module: l10n_nl_oin
#: model:ir.model.fields,field_description:l10n_nl_oin.field_res_partner__id
msgid "ID"
msgstr ""

#. module: l10n_nl_oin
#: model:ir.model.fields,field_description:l10n_nl_oin.field_res_partner____last_update
msgid "Last Modified on"
msgstr ""

#. module: l10n_nl_oin
#: model:ir.model.fields,field_description:l10n_nl_oin.field_res_partner__nl_oin_display
#: model:ir.model.fields,field_description:l10n_nl_oin.field_res_users__nl_oin_display
msgid "Nl Oin Display"
msgstr ""

#. module: l10n_nl_oin
#: code:addons/l10n_nl_oin/models/res_partner.py:0
#, python-format
msgid "The OIN you entered (%s) is not valid."
msgstr ""

#. module: l10n_nl_oin
#: code:addons/l10n_nl_oin/models/res_partner.py:0
#: code:addons/l10n_nl_oin/models/res_partner.py:0
#, python-format
msgid "Warning!"
msgstr ""
74 changes: 74 additions & 0 deletions l10n_nl_oin/i18n/nl.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_nl_oin
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-03-03 09:45+0000\n"
"Last-Translator: Cas Vissers <[email protected]>\n"
"Language-Team: none\n"
"Language: nl\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"
"X-Generator: Weblate 4.3.2\n"

#. module: l10n_nl_oin
#: code:addons/l10n_nl_oin/models/res_partner.py:0
#, python-format
msgid "Another partner (%s) has the same OIN (%s)."
msgstr "Een andere relatie (%s) heeft dezelfde OIN (%s)."

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

#. module: l10n_nl_oin
#: model:ir.model.fields,field_description:l10n_nl_oin.field_res_partner__display_name
msgid "Display Name"
msgstr "Weergave naam"

#. module: l10n_nl_oin
#: model:ir.model.fields,field_description:l10n_nl_oin.field_res_partner__nl_oin
#: model:ir.model.fields,field_description:l10n_nl_oin.field_res_users__nl_oin
msgid "Dutch OIN"
msgstr "Nederlands OIN"

#. module: l10n_nl_oin
#: model:ir.model.fields,help:l10n_nl_oin.field_res_partner__nl_oin
#: model:ir.model.fields,help:l10n_nl_oin.field_res_users__nl_oin
msgid "Dutch Organisatie-identificatienummer (OIN)"
msgstr "Nederlands Organisatie Identificatie Nummer (OIN)"

#. module: l10n_nl_oin
#: model:ir.model.fields,field_description:l10n_nl_oin.field_res_partner__id
msgid "ID"
msgstr "ID"

#. module: l10n_nl_oin
#: model:ir.model.fields,field_description:l10n_nl_oin.field_res_partner____last_update
msgid "Last Modified on"
msgstr "Laatst gewijzigd op"

#. module: l10n_nl_oin
#: model:ir.model.fields,field_description:l10n_nl_oin.field_res_partner__nl_oin_display
#: model:ir.model.fields,field_description:l10n_nl_oin.field_res_users__nl_oin_display
msgid "Nl Oin Display"
msgstr "Nl OIN weergave"

#. module: l10n_nl_oin
#: code:addons/l10n_nl_oin/models/res_partner.py:0
#, python-format
msgid "The OIN you entered (%s) is not valid."
msgstr "De ingevoerde OIN (%s) is ongeldig."

#. module: l10n_nl_oin
#: code:addons/l10n_nl_oin/models/res_partner.py:0
#: code:addons/l10n_nl_oin/models/res_partner.py:0
#, python-format
msgid "Warning!"
msgstr "Let op!"
74 changes: 74 additions & 0 deletions l10n_nl_oin/i18n/nl_NL.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_nl_oin
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-03-03 09:45+0000\n"
"Last-Translator: Cas Vissers <[email protected]>\n"
"Language-Team: none\n"
"Language: nl_NL\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"
"X-Generator: Weblate 4.3.2\n"

#. module: l10n_nl_oin
#: code:addons/l10n_nl_oin/models/res_partner.py:0
#, python-format
msgid "Another partner (%s) has the same OIN (%s)."
msgstr "Een andere relatie (%s) heeft dezelfde OIN (%s)."

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

#. module: l10n_nl_oin
#: model:ir.model.fields,field_description:l10n_nl_oin.field_res_partner__display_name
msgid "Display Name"
msgstr "Weergave naam"

#. module: l10n_nl_oin
#: model:ir.model.fields,field_description:l10n_nl_oin.field_res_partner__nl_oin
#: model:ir.model.fields,field_description:l10n_nl_oin.field_res_users__nl_oin
msgid "Dutch OIN"
msgstr "Nederlands OIN"

#. module: l10n_nl_oin
#: model:ir.model.fields,help:l10n_nl_oin.field_res_partner__nl_oin
#: model:ir.model.fields,help:l10n_nl_oin.field_res_users__nl_oin
msgid "Dutch Organisatie-identificatienummer (OIN)"
msgstr "Nederlands Organisatie Identificatie Nummer (OIN)"

#. module: l10n_nl_oin
#: model:ir.model.fields,field_description:l10n_nl_oin.field_res_partner__id
msgid "ID"
msgstr "ID"

#. module: l10n_nl_oin
#: model:ir.model.fields,field_description:l10n_nl_oin.field_res_partner____last_update
msgid "Last Modified on"
msgstr "Laatst gewijzigd op"

#. module: l10n_nl_oin
#: model:ir.model.fields,field_description:l10n_nl_oin.field_res_partner__nl_oin_display
#: model:ir.model.fields,field_description:l10n_nl_oin.field_res_users__nl_oin_display
msgid "Nl Oin Display"
msgstr "Nl OIN weergave"

#. module: l10n_nl_oin
#: code:addons/l10n_nl_oin/models/res_partner.py:0
#, python-format
msgid "The OIN you entered (%s) is not valid."
msgstr "De ingevoerde OIN (%s) is ongeldig."

#. module: l10n_nl_oin
#: code:addons/l10n_nl_oin/models/res_partner.py:0
#: code:addons/l10n_nl_oin/models/res_partner.py:0
#, python-format
msgid "Warning!"
msgstr "Let op!"
23 changes: 23 additions & 0 deletions l10n_nl_oin/migrations/15.0.1.0.0/pre-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2023 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
"""In the Dutch localization of Odoo 15.0 a new field 'l10n_nl_oin' was added.
This method renames old field 'nl_oin' to 'l10n_nl_oin', in order to preserve
existing values.
"""
openupgrade.rename_fields(
env,
[
(
"res.partner",
"res_partner",
"nl_oin",
"l10n_nl_oin",
)
],
)
3 changes: 3 additions & 0 deletions l10n_nl_oin/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import res_partner
Loading

0 comments on commit 37e3317

Please sign in to comment.