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

[16.0][ADD] New module l10n_be_bpost_address_validation #186

Open
wants to merge 13 commits into
base: 16.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 127 additions & 0 deletions l10n_be_bpost_address_validation/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
========================
Bpost address validation
========================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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--belgium-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-belgium/tree/16.0/l10n_be_bpost_address_validation
:alt: OCA/l10n-belgium
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-belgium-16-0/l10n-belgium-16-0-l10n_be_bpost_address_validation
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/l10n-belgium&target_branch=16.0
:alt: Try me on Runboat

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

This module allows you to check partner's addresses validity in one click.
If address is not valid a proposal change will be displayed and you will be free to keep it or not.
If you accept it, the partner's address will be automatically updated.

The validation of the address is done throught the bpost API available here: https://www.bpost.be/en/addressing-web-service-widgets-address-validation.
Bpost is Belgium's leading postal operator and plays a key role in maintaining the country's economic and social fabric.

**Table of contents**

.. contents::
:local:

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

This module can be installed in the usual way.

Usage
=====

Once your user has the correct permissions, open a partner that has a belgian
address and click on Check address validity button.

.. figure:: https://raw.githubusercontent.com/OCA/l10n-belgium/c89841d84b63052e5c6d63049a2d81b473490fb4/l10n_be_bpost_address_validation/static/description/doc_new_partner.png
:width: 90%
:alt: Partner form with Check address validity button
:align: center

If address is not valid, a popup will appear telling you that the address is not valid and will suggest a possible change.

.. figure:: https://raw.githubusercontent.com/OCA/l10n-belgium/c89841d84b63052e5c6d63049a2d81b473490fb4/l10n_be_bpost_address_validation/static/description/doc_on_click.png
:width: 90%
:alt: Popup with the suggest change.
:align: center

If you decide to keep the change, partner's address will be automatically updated.

.. figure:: https://raw.githubusercontent.com/OCA/l10n-belgium/c89841d84b63052e5c6d63049a2d81b473490fb4/l10n_be_bpost_address_validation/static/description/doc_on_apply_changes.png
:width: 90%
:alt: Partner form updated.
:align: center

Now, if you click again on Check address validity button, you will see that the address is valid.

.. figure:: https://raw.githubusercontent.com/OCA/l10n-belgium/c89841d84b63052e5c6d63049a2d81b473490fb4/l10n_be_bpost_address_validation/static/description/doc_on_success.png
:width: 90%
:alt: Partner form updated.
:align: center

Be careful not to provide an invalid or incomplete address.

.. figure:: https://raw.githubusercontent.com/OCA/l10n-belgium/c89841d84b63052e5c6d63049a2d81b473490fb4/l10n_be_bpost_address_validation/static/description/doc_invalid_address_form.png
:width: 90%
:alt: Partner form with invalid address.
:align: center

.. figure:: https://raw.githubusercontent.com/OCA/l10n-belgium/c89841d84b63052e5c6d63049a2d81b473490fb4/l10n_be_bpost_address_validation/static/description/doc_invalid_address.png
:width: 90%
:alt: Error popup.
:align: center

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-belgium/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-belgium/issues/new?body=module:%20l10n_be_bpost_address_validation%0Aversion:%2016.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
~~~~~~~

* ACSONE SA/NV

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

* Samuel Kouff <[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.

This module is part of the `OCA/l10n-belgium <https://github.com/OCA/l10n-belgium/tree/16.0/l10n_be_bpost_address_validation>`_ 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_be_bpost_address_validation/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import wizards
28 changes: 28 additions & 0 deletions l10n_be_bpost_address_validation/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2023 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Bpost address validation",
"summary": (
"Check the validity of your partner's addresses "
"or make a change with a change proposal."
),
"version": "16.0.1.0.0",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/l10n-belgium",
"depends": ["base", "web"],
"data": [
"security/ir.model.access.csv",
"wizards/bpost_address_validation.xml",
"views/res_partner.xml",
],
"assets": {
"web.assets_backend": [
("include", "web._assets_helpers"),
"web/static/src/scss/pre_variables.scss",
"web/static/lib/bootstrap/scss/_variables.scss",
("include", "web._assets_bootstrap"),
]
},
"installable": True,
}
151 changes: 151 additions & 0 deletions l10n_be_bpost_address_validation/i18n/fr_BE.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_be_bpost_address_validation
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-02 09:25+0000\n"
"PO-Revision-Date: 2023-05-02 09:25+0000\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_be_bpost_address_validation
#: model_terms:ir.ui.view,arch_db:l10n_be_bpost_address_validation.view_check_address_validity_form
msgid "<span>Success ! The address given is valid.</span>"
msgstr "<span>Succès ! L'adresse encodée est valide.</span>"

#. module: l10n_be_bpost_address_validation
#. odoo-python
#: code:addons/l10n_be_bpost_address_validation/wizards/bpost_address_validation.py:0
#, python-format
msgid ""
"An error has been detected in the given address. Would you like to keep the "
"suggest change ?"
msgstr ""
"Une erreur a été détectée dans l'adresse renseignée. Voulez-vous appliquer "
"les changements ?"

#. module: l10n_be_bpost_address_validation
#. odoo-python
#: code:addons/l10n_be_bpost_address_validation/wizards/bpost_address_validation.py:0
#, python-format
msgid "An error occurred when fetching data from bpost API."
msgstr ""
"Une erreur est survenue lors de la récupération des données de l'API de "
"bpost."

#. module: l10n_be_bpost_address_validation
#: model_terms:ir.ui.view,arch_db:l10n_be_bpost_address_validation.view_check_address_validity_form
msgid "Apply changes"
msgstr "Appliquer les changements"

#. module: l10n_be_bpost_address_validation
#: model:ir.model.fields,field_description:l10n_be_bpost_address_validation.field_bpost_address_validation_wizard__bad_address
msgid "Bad Address"
msgstr ""

#. module: l10n_be_bpost_address_validation
#: model:ir.model.fields,field_description:l10n_be_bpost_address_validation.field_bpost_address_validation_wizard__bpost_address
msgid "Bpost Address"
msgstr ""

#. module: l10n_be_bpost_address_validation
#: model_terms:ir.ui.view,arch_db:l10n_be_bpost_address_validation.view_check_address_validity_form
msgid "Cancel"
msgstr "Annuler"

#. module: l10n_be_bpost_address_validation
#. odoo-python
#: code:addons/l10n_be_bpost_address_validation/models/res_partner.py:0
#, python-format
msgid "Check Address Validity"
msgstr "Vérifier la validité de l'adresse"

#. module: l10n_be_bpost_address_validation
#: model_terms:ir.ui.view,arch_db:l10n_be_bpost_address_validation.res_partner_form_view
msgid "Check address validity"
msgstr "Vérifier la validité de l'adresse"

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

#. module: l10n_be_bpost_address_validation
#: model:ir.model.fields,field_description:l10n_be_bpost_address_validation.field_bpost_address_validation_wizard__create_uid
msgid "Created by"
msgstr ""

#. module: l10n_be_bpost_address_validation
#: model:ir.model.fields,field_description:l10n_be_bpost_address_validation.field_bpost_address_validation_wizard__create_date
msgid "Created on"
msgstr ""

#. module: l10n_be_bpost_address_validation
#: model:ir.model.fields,field_description:l10n_be_bpost_address_validation.field_bpost_address_validation_wizard__display_name
msgid "Display Name"
msgstr ""

#. module: l10n_be_bpost_address_validation
#: model:ir.model.fields,field_description:l10n_be_bpost_address_validation.field_bpost_address_validation_wizard__id
msgid "ID"
msgstr ""

#. module: l10n_be_bpost_address_validation
#: model:ir.model.fields,field_description:l10n_be_bpost_address_validation.field_res_partner__is_be
#: model:ir.model.fields,field_description:l10n_be_bpost_address_validation.field_res_users__is_be
msgid "Is Be"
msgstr ""

#. module: l10n_be_bpost_address_validation
#: model:ir.model.fields,field_description:l10n_be_bpost_address_validation.field_bpost_address_validation_wizard__is_valid
msgid "Is Valid"
msgstr ""

#. module: l10n_be_bpost_address_validation
#: model:ir.model.fields,field_description:l10n_be_bpost_address_validation.field_bpost_address_validation_wizard____last_update
msgid "Last Modified on"
msgstr ""

#. module: l10n_be_bpost_address_validation
#: model:ir.model.fields,field_description:l10n_be_bpost_address_validation.field_bpost_address_validation_wizard__write_uid
msgid "Last Updated by"
msgstr ""

#. module: l10n_be_bpost_address_validation
#: model:ir.model.fields,field_description:l10n_be_bpost_address_validation.field_bpost_address_validation_wizard__write_date
msgid "Last Updated on"
msgstr ""

#. module: l10n_be_bpost_address_validation
#: model:ir.model.fields,field_description:l10n_be_bpost_address_validation.field_bpost_address_validation_wizard__partner_id
msgid "Partner"
msgstr ""

#. module: l10n_be_bpost_address_validation
#: model:ir.model.fields,field_description:l10n_be_bpost_address_validation.field_bpost_address_validation_wizard__suggest_changes
msgid "Suggest Changes"
msgstr ""

#. module: l10n_be_bpost_address_validation
#. odoo-python
#: code:addons/l10n_be_bpost_address_validation/wizards/bpost_address_validation.py:0
#, python-format
msgid "The given address is not complete or the address cannot be found."
msgstr "L'adresse encodée n'est pas complète ou est introuvable."

#. module: l10n_be_bpost_address_validation
#: model:ir.model.fields,field_description:l10n_be_bpost_address_validation.field_bpost_address_validation_wizard__warning_message
msgid "Warning Message"
msgstr ""

#. module: l10n_be_bpost_address_validation
#: model:ir.model,name:l10n_be_bpost_address_validation.model_bpost_address_validation_wizard
msgid "bpost.address.validation.wizard"
msgstr ""
Loading