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

problem occuring during VIES validation using search via API SIRENE #591

Open
risto42 opened this issue Dec 11, 2024 · 1 comment
Open

Comments

@risto42
Copy link

risto42 commented Dec 11, 2024

Unfortunately being a victim of success, VIES is frequently overloaded returning the error message MS_MAX_CONCURRENT_REQ which fails the query, failing the operation.

2024-12-10 13:07:06,569 1132 WARNING myODOO zeep.wsdl.bindings.soap: Forcing soap:address location to HTTPS 
2024-12-10 13:07:11,579 1132 ERROR myODOO odoo.addons.l10n_fr_siret_lookup.models.res_partner: VIES query failed: HTTPSConnectionPool(host='ec.europa.eu', port=443): Read timed out. (read timeout=5) 
2024-12-10 13:07:11,605 1132 WARNING myODOO odoo.http: Erreur pendant l'interrogation du VIES.
Erreur technique : HTTPSConnectionPool(host='ec.europa.eu', port=443): Read timed out. (read timeout=5). 
2024-12-10 13:07:26,917 1131 WARNING myODOO zeep.wsdl.bindings.soap: Forcing soap:address location to HTTPS 
2024-12-10 13:07:26,965 1131 ERROR myODOO odoo.addons.l10n_fr_siret_lookup.models.res_partner: VIES query failed: MS_MAX_CONCURRENT_REQ 
2024-12-10 13:07:26,984 1131 WARNING myODOO odoo.http: Erreur pendant l'interrogation du VIES.
Erreur technique : MS_MAX_CONCURRENT_REQ. 

It would be nice to be able to 'tag' the fact that a VIES check is demanded if the interactive query fails, and eventually schedule a CRON job to retry after some interval of time.

https://stackoverflow.com/questions/74821299/ms-max-concurrent-req-vies-vat-validation

Then, at least, if one is creating a record, the effort isn't totally lost.

@risto42 risto42 changed the title problem occuring during VIES validation problem occuring during VIES validation using search via API SIRENE Dec 11, 2024
@risto42
Copy link
Author

risto42 commented Jan 23, 2025

recently it is for the most part impossible to use this function, please upgrade from enhancement to bug
it should therefore be optional (by default) to do the VIES validation.

In any event, if base_vat is installed, env.company.vat_check_vies should be respected, or at least this value should be used as the default value of an eventual option specifying to do a synchronous VIES check.

There are two different levels of VAT number validation:
--------------------------------------------------------
    * By default, a simple off-line check is performed using the known validation
      rules for the country, usually a simple check digit. This is quick and 
      always available, but allows numbers that are perhaps not truly allocated,
      or not valid anymore.

    * When the "VAT VIES Check" option is enabled (in the configuration of the user's
      Company), VAT numbers will be instead submitted to the online EU VIES
      database, which will truly verify that the number is valid and currently
      allocated to a EU company. This is a little bit slower than the simple
      off-line check, requires an Internet connection, and may not be available
      all the time. If the service is not available or does not support the
      requested country (e.g. for non-EU countries), a simple check will be performed
      instead.

Finally, many moral persons do not have a valid VAT number.
https://annuaire-entreprises.data.gouv.fr/definitions/tva-intracommunautaire

If the VIES check fails, for any reason, that should not invalidate the API search results, but only the vat number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant