From 6e3360839bb49cb4dda381cc2605a94e9c6dc732 Mon Sep 17 00:00:00 2001
From: Franco Leyes
Date: Thu, 28 Nov 2024 15:55:14 -0300
Subject: [PATCH] [MIG] partner_vat_unique: Migration to 18.0
---
partner_vat_unique/README.rst | 10 +++++-----
partner_vat_unique/__manifest__.py | 2 +-
partner_vat_unique/models/res_partner.py | 7 +++++--
partner_vat_unique/static/description/index.html | 6 +++---
4 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/partner_vat_unique/README.rst b/partner_vat_unique/README.rst
index c3710b2c6de..94fa7425b9a 100644
--- a/partner_vat_unique/README.rst
+++ b/partner_vat_unique/README.rst
@@ -17,13 +17,13 @@ Partner VAT Unique
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github
- :target: https://github.com/OCA/partner-contact/tree/17.0/partner_vat_unique
+ :target: https://github.com/OCA/partner-contact/tree/18.0/partner_vat_unique
:alt: OCA/partner-contact
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/partner-contact-17-0/partner-contact-17-0-partner_vat_unique
+ :target: https://translation.odoo-community.org/projects/partner-contact-18-0/partner-contact-18-0-partner_vat_unique
: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/partner-contact&target_branch=17.0
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/partner-contact&target_branch=18.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -55,7 +55,7 @@ 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 `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -98,6 +98,6 @@ 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/partner-contact `_ project on GitHub.
+This module is part of the `OCA/partner-contact `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/partner_vat_unique/__manifest__.py b/partner_vat_unique/__manifest__.py
index b022f5d4392..b1110372aa1 100644
--- a/partner_vat_unique/__manifest__.py
+++ b/partner_vat_unique/__manifest__.py
@@ -4,7 +4,7 @@
{
"name": "Partner VAT Unique",
"summary": "Module to make the VAT number unique for customers and suppliers.",
- "version": "17.0.1.0.0",
+ "version": "18.0.1.0.0",
"category": "Customer Relationship Management",
"website": "https://github.com/OCA/partner-contact",
"author": "Grant Thornton S.L.P, Odoo Community Association (OCA)",
diff --git a/partner_vat_unique/models/res_partner.py b/partner_vat_unique/models/res_partner.py
index 168019bc16a..00e8cdf890d 100644
--- a/partner_vat_unique/models/res_partner.py
+++ b/partner_vat_unique/models/res_partner.py
@@ -2,7 +2,7 @@
# Copyright 2020 Manuel Calero - Tecnativa
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-from odoo import _, api, fields, models
+from odoo import api, fields, models
from odoo.exceptions import ValidationError
from odoo.tools import config
@@ -24,5 +24,8 @@ def _check_vat_unique(self):
continue
if record.same_vat_partner_id:
raise ValidationError(
- _("The VAT %s already exists in another partner.") % record.vat
+ self.env._(
+ "The VAT %(vat)s already exists in another partner.",
+ vat=record.vat,
+ )
)
diff --git a/partner_vat_unique/static/description/index.html b/partner_vat_unique/static/description/index.html
index bb753939f99..9750f3a1a26 100644
--- a/partner_vat_unique/static/description/index.html
+++ b/partner_vat_unique/static/description/index.html
@@ -369,7 +369,7 @@ Partner VAT Unique
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:0b902183f3c23cf1aff8832ff5266674215d4c6c966f2e4d40762a7524a8e3b9
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
Module to make the VAT number unique for customers and suppliers. Will
not consider empty VATs as duplicated.
Table of contents
@@ -404,7 +404,7 @@
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.
+feedback.
Do not contact contributors directly about support or help with technical issues.
@@ -439,7 +439,7 @@
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/partner-contact project on GitHub.
+
This module is part of the OCA/partner-contact project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.