Hi everyone,
I would like to know if someone can help me with the problem I have when trying to create clients using the odoo 14 api.
The problem I have is that I am importing the clients from my odoo 8 to my odoo 14 with a script, and everything is done fine, the only problem I have is in the VAT field, since it throws me an error that the number de vat seems to be invalid.
This validation is not from VIES (which I also have deactivated in the odoo settings), but it is a separate validation and I cannot deactivate it when creating clients.
I have tried many ways but none work for me. I have passed the "check_vat : False" variable in the context, but this does not work either and I no longer know how to solve this problem.
This is the code part
models_target.execute_kw(
db_target,
uid_target,
password_target,
'res.partner',
'create',
[{
............ other fields ............
'vat': client_old['vat'],
}],
{'context': {'check_vat': False},}
)
Error:
The VAT number [........] for the partner [........] seems to be invalid. \nNote: the expected format is ESA12345674'
I hope someone can help me, thank you very much