+ 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 = {}
corrijo:
=== modified file 'l10n_ve_ fiscal_ requirements/ partner. py' fiscal_ requirements/ partner. py 2012-02-14 18:28:19 +0000 fiscal_ requirements/ partner. py 2012-03-29 23:06:05 +0000
--- l10n_ve_
+++ l10n_ve_
@@ -149,6 +149,16 @@
return False
return True
+ def _split_vat(self, vat): get('res. partner. address' ).browse( cr, uid, current_ partner[ 'address' ])]:
context = {}
+ '''
+ 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.
+ vat_number = vat_number.strip()
+ return vat_country, vat_number
+
def update_rif(self, cr, uid, ids, context=None):
if context is None: