This app check if the VAT identification number / NIF is correct. It depends of vatnumber module to check the VAT / NIF for the particular country and optionaly will be fully validated against EU's VIES service.
This is un adaptation from this work: https://github.com/odoo/odoo/tree/master/addons/base_vat
- frappe/erpnext (To install: bench page )
- python module vatnumber (First do bench shell and then easy_install vatnumber or pip install vatnumber.)
- bench get-app base_vat https://github.com/saguas/frappe_base_vat.git
- bench install-app base_vat [your_site_name] or install from frappe desk installer.
After install, this module provide a text box on the customer (Selling/Customer) to enter the vat identification number. Just enter the vat (TIF) number. Optionally click Validate VAT button to quickly (client side and before save) check if the number is valid. Either way, the number will be checked on the server before save to database.
If your company want that the vat number would be checked against [EU's VIES service] (http://ec.europa.eu/taxation_customs/taxation/vat/traders/vat_number/index_en.htm), then you must enforce that, clicking on the check box in that company document (Setup/Masters/Company).
###Note
Base vat check if another customer already has that number. If so than customer do not will be saved. Because sometimes customers are registers by another name, in that case base vat return the name of that customer for double check.
If you need check the vat number on your own module, just call the whitelist function validate_vat (PATH: base_vat.vat.vat_validation.validate_vat) and pass the vat number and company name as arguments. See Customer Script (Customer-Client) validate_vat function.
For details and documentation, see the website