From 5dc88571a361f5309122af4590867413c032d9a8 Mon Sep 17 00:00:00 2001 From: Tran Thanh Phuc Date: Tue, 23 Feb 2021 10:46:42 +0700 Subject: [PATCH] [FIX] partner_identification: Do not validate number if validation code is not set --- partner_identification/models/res_partner_id_category.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/partner_identification/models/res_partner_id_category.py b/partner_identification/models/res_partner_id_category.py index aab64ac9b..5ea2d3190 100644 --- a/partner_identification/models/res_partner_id_category.py +++ b/partner_identification/models/res_partner_id_category.py @@ -46,7 +46,7 @@ class ResPartnerIdCategory(models.Model): python validation code fails """ self.ensure_one() - if self.env.context.get("id_no_validate"): + if self.env.context.get("id_no_validate") or not self.validation_code: return eval_context = self._validation_eval_context(id_number) try: