Skip to content
Snippets Groups Projects
Commit 11fd5b4d authored by root's avatar root
Browse files

[FIX] base_vat: allow disabling VAT check through context


Before this fix there is no real way to influence the VAT validation.
This can be problematic though as in some cases external platforms push data to you
on which you don't really have control. If an external software pushes an invalid VAT
and your database has the option 'Verify VAT Numbers' checked on there is no way
for you to bypass this though.
This means that before this commit you have to always run VAT number checks on all data,
no matter if they come through the frontend or backend.

After this commit you can supply a context key 'no_vat_validation' though.
This way you could skip doing VAT number validations on (some) records while still
enforcing this in the UI.
This allows you to have crons/external API's push any VAT number while enforcing full
validation through the UI.

This opens up the best of both worlds.

closes odoo/odoo#80503

Signed-off-by: default avatarOlivier Colson <oco@odoo.com>
parent 9f0ce611
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment