openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #06189
[Merge] lp:~openerp-dev/openobject-addons/trunk-bug-771664-mtr into lp:openobject-addons
Meera Trambadia (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-771664-mtr into lp:openobject-addons.
Requested reviews:
qdp (OpenERP) (qdp)
Mustufa Rangwala (Open ERP) (mra-tinyerp)
Related bugs:
Bug #771664 in OpenERP Addons: "Swiss VAT verification not implemented"
https://bugs.launchpad.net/openobject-addons/+bug/771664
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-771664-mtr/+merge/59512
base_vat: it allows to save a record if VAT for a country is not define --fixes lp:771664
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-771664-mtr/+merge/59512
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-771664-mtr.
=== modified file 'base_vat/base_vat.py'
--- base_vat/base_vat.py 2011-02-11 11:29:07 +0000
+++ base_vat/base_vat.py 2011-04-29 13:34:25 +0000
@@ -59,11 +59,14 @@
Check the VAT number depending of the country.
http://sima-pc.com/nif.php
'''
+ country_obj = self.pool.get('res.country')
for partner in self.browse(cr, uid, ids, context=context):
if not partner.vat:
continue
vat_country, vat_number = self._split_vat(partner.vat)
if not hasattr(self, 'check_vat_' + vat_country):
+ if country_obj.search(cr, uid, [('code', 'ilike', vat_country)], context=context):
+ continue
return False
check = getattr(self, 'check_vat_' + vat_country)
if not check(vat_number):
Follow ups