Comment 7 for bug 968628

Revision history for this message
Aristóbulo Meneses (aristobulo) wrote :

corrijo:

=== modified file 'l10n_ve_fiscal_requirements/partner.py'
--- l10n_ve_fiscal_requirements/partner.py 2012-02-14 18:28:19 +0000
+++ l10n_ve_fiscal_requirements/partner.py 2012-03-29 23:06:05 +0000
@@ -149,6 +149,16 @@
             return False
         return True

+ def _split_vat(self, vat):
+ '''
+ By default base_vat._split_vat cleans vat of whitespaces,
+ if country code is VE this doesn't apply
+ '''
+ vat_country, vat_number = vat[:2].lower(), vat[2:]
+ if not 'VE' in [a.country_id.code for a in self.pool.get('res.partner.address').browse(cr, uid, current_partner['address'])]:
+ vat_number = vat_number.strip()
+ return vat_country, vat_number
+
     def update_rif(self, cr, uid, ids, context=None):
         if context is None:
             context = {}