openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #08064
[Bug 939387] Re: check vat using vies will always fail GRAVE
This is not a bug, "vatnumber' is an external library that contains the vat_check_vies method. Please do not report bugs based on intuitions. Trying to provide a full bug description that contains real "steps to reproduce" should help you verify your intuitions, and is explicitly requested on the bug report page.
Adding "GRAVE" in a bug title also serves no purpose - as we can see.
** Changed in: openobject-addons
Importance: Low => Undecided
** Changed in: openobject-addons
Status: Confirmed => Invalid
** Changed in: openobject-addons
Assignee: OpenERP R&D Addons Team 3 (openerp-dev-addons3) => (unassigned)
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/939387
Title:
check vat using vies will always fail GRAVE
Status in OpenERP Addons (modules):
Invalid
Bug description:
gr py check_vies
./addons/base_vat/base_vat.py:114: if user_company.vat_check_vies:
./addons/base_vat/base_vat.py:98: return vatnumber.check_vies(country_code.upper()+vat_number)
./addons/base_vat/res_company.py:27: 'vat_check_vies': fields.boolean('VIES VAT Check',
check_vies is not defined anywhere
def vies_vat_check(self, cr, uid, country_code, vat_number, context=None):
try:
# Validate against VAT Information Exchange System (VIES)
# see also http://ec.europa.eu/taxation_customs/vies/
return vatnumber.check_vies(country_code.upper()+vat_number)
except Exception:
# see http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl
# Fault code may contain INVALID_INPUT, SERVICE_UNAVAILABLE, MS_UNAVAILABLE,
# TIMEOUT or SERVER_BUSY. There is no way we can validate the input
# with VIES if any of these arise, including the first one (it means invalid
# country code or empty VAT number), so we fall back to the simple check.
return self.simple_vat_check(cr, uid, country_code, vat_number, context=context)
IMHO this should be done by a on change trigger (not a button)
storing unchecked (false) numbers does not make sense at all - and has
legal consequences
I strongly suggest to store the date/time of the VIES check not just set
def vat_change(self, cr, uid, ids, value, context=None):
return {'value': {'vat_subjected': bool(value)}}
which can be overriden manualy
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/939387/+subscriptions
References