[FIX]pms_api_rest: document number check has been changed from document_type aeat_identification_type to code

This commit is contained in:
braisab
2024-06-12 12:47:35 +02:00
committed by Darío Lodeiros
parent d5e52d4b0b
commit 177ff1db9b

View File

@@ -579,7 +579,7 @@ class PmsPartnerService(Component):
document_type.validate_id_number(id_number)
except ValidationError as e:
error_mens = str(e)
if document_type.aeat_identification_type in ["02", "04"]:
if document_type.code == 'D':
Partner = self.env["res.partner"]
error = not Partner.simple_vat_check(
country_code=country.code,