← Back to team overview

openerp-dev-web team mailing list archive

[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:
  OpenERP Core Team (openerp)
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/59457

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/59457
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 07:10:49 +0000
@@ -63,6 +63,11 @@
             if not partner.vat:
                 continue
             vat_country, vat_number = self._split_vat(partner.vat)
+            if not _ref_vat.has_key(vat_country):
+                country_code = vat_country.upper()
+                code = self.pool.get('res.country').search(cr, uid, [('code', '=', country_code)])
+                if code:
+                    continue
             if not hasattr(self, 'check_vat_' + vat_country):
                 return False
             check = getattr(self, 'check_vat_' + vat_country)


Follow ups