[FIX] l10n_be : Vat declaration wizard corrected
authorJMA(OpenERP) <>
Mon, 23 Aug 2010 13:47:14 +0000 (19:17 +0530)
committerJay (OpenERP) <jvo@tinyerp.com>
Mon, 23 Aug 2010 13:47:14 +0000 (19:17 +0530)
lp bug: https://launchpad.net/bugs/619849 fixed

bzr revid: jvo@tinyerp.com-20100823134714-2js2i5pn0fzpjnym

addons/l10n_be/wizard/account_vat_declaration.py

index a3ffe76..916dcc8 100644 (file)
@@ -87,7 +87,7 @@ class wizard_vat_declaration(wizard.interface):
         send_ref = str(obj_company.partner_id.id) + str(account_period.date_start[5:7]) + str(account_period.date_stop[:4])
 
         data_of_file='<?xml version="1.0"?>\n<VATSENDING xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="MultiDeclarationTVA-NoSignature-16.xml">'
-        data_of_file +='\n\t<DECLARER>\n\t\t<VATNUMBER>'+str(vat_no)+'</VATNUMBER>\n\t\t<NAME>'+str(obj_company.name)+'</NAME>\n\t\t<ADDRESS>'+address+'</ADDRESS>'
+        data_of_file +='\n\t<DECLARER>\n\t\t<VATNUMBER>'+str(vat_no)+'</VATNUMBER>\n\t\t<NAME>'+ obj_company.name +'</NAME>\n\t\t<ADDRESS>'+address+'</ADDRESS>'
         data_of_file +='\n\t\t<POSTCODE>'+post_code+'</POSTCODE>\n\t\t<CITY>'+city+'</CITY>\n\t\t<COUNTRY>'+country_code+'</COUNTRY>\n\t\t<SENDINGREFERENCE>'+send_ref+'</SENDINGREFERENCE>\n\t</DECLARER>'
         data_of_file +='\n\t<VATRECORD>\n\t\t<RECNUM>1</RECNUM>\n\t\t<VATNUMBER>'+str(vat_no[2:])+'</VATNUMBER>\n\t\t<DPERIODE>\n\t\t\t'
 
@@ -116,7 +116,7 @@ class wizard_vat_declaration(wizard.interface):
 
         data_of_file +='\n\t\t\t</DATA_ELEM>\n\t\t</DATA>\n\t</VATRECORD>\n</VATSENDING>'
         data['form']['msg']='Save the File with '".xml"' extension.'
-        data['form']['file_save']=base64.encodestring(data_of_file)
+        data['form']['file_save'] = base64.encodestring(data_of_file.encode('utf8'))
         return data['form']