From: Bharat Devnani (OpenERP) Date: Mon, 16 Jan 2012 05:06:27 +0000 (+0530) Subject: [IMP] improved the xml format of wizard l10n_be/wizard/l10n_be_account_vat_declaration.py X-Git-Tag: 6.1.0-web~158^2~20 X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;ds=inline;h=03b71051fb1d4f655c5647c1f7127fec240fe2af;p=odoo%2Fodoo.git [IMP] improved the xml format of wizard l10n_be/wizard/l10n_be_account_vat_declaration.py bzr revid: bde@tinyerp.com-20120116050627-q7k83nytni54rrv1 --- diff --git a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py index 138f6f6..fb7352e 100644 --- a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py +++ b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py @@ -87,10 +87,10 @@ class l10n_be_vat_declaration(osv.osv_memory): account_period = obj_acc_period.browse(cr, uid, data['period_id'][0], context=context) send_ref = str(obj_company.partner_id.id) + str(account_period.date_start[5:7]) + str(account_period.date_stop[:4]) - data_of_file = '\n' - data_of_file +='\n\t\n\t\t'+str(vat_no)+'\n\t\t'+ obj_company.name +'\n\t\t
'+address+'
' - data_of_file +='\n\t\t'+post_code+'\n\t\t'+city+'\n\t\t'+country_code+'\n\t\t'+send_ref+'\n\t
' - data_of_file +='\n\t\n\t\t1\n\t\t'+((vat_no and str(vat_no[2:])) or '')+'\n\t\t\n\t\t\t' + data_of_file = '\n' + data_of_file +='\n\t' + data_of_file +='\n\t\t\n\t\t\t'+str(vat_no)+'\n\t\t' + data_of_file +='\n\t\t\n\t\t' starting_month = account_period.date_start[5:7] ending_month = account_period.date_stop[5:7] @@ -98,13 +98,12 @@ class l10n_be_vat_declaration(osv.osv_memory): #starting month and ending month of selected period are not the same #it means that the accounting isn't based on periods of 1 month but on quarters quarter = str(((int(starting_month) - 1) / 3) + 1) - data_of_file += ''+quarter+'\n\t\t\t' + data_of_file += ''+quarter+'\n\t\t\t' else: - data_of_file += ''+starting_month+'\n\t\t\t' - data_of_file += '' + str(account_period.date_stop[:4]) + '\n\t\t\n' - data_of_file += '\t\t' - data_of_file += '\n\t\t'+ (data['client_nihil'] and 'YES' or 'NO') +'' - data_of_file +='\n\t\t\n\t\t\t' + data_of_file += '\t'+starting_month+'\n\t\t\t' + data_of_file += '' + str(account_period.date_stop[:4]) + '\n\t\t\n' + data_of_file +='\t\t\t' + data_of_file +='\n\t\t\t\t' cases_list = [] for item in tax_info: @@ -121,9 +120,13 @@ class l10n_be_vat_declaration(osv.osv_memory): cases_list.append(item) cases_list.sort() for item in cases_list: - data_of_file +='\n\t\t\t\t' + str(abs(int(round(item['sum_period']*100)))) + '' - - data_of_file += '\n\t\t\t\n\t\t\n\t\n
' + data_of_file +='\n\t\t\t\t' + str(abs(int(round(item['sum_period']*100)))) + '' + + data_of_file +='\n\t\t\t\t' + data_of_file += '\n\t\t' + data_of_file += '\n\t\t'+ (data['client_nihil'] and 'YES' or 'NO') +'' + data_of_file += '\n\t\t' + data_of_file += '\n\t \n' model_data_ids = mod_obj.search(cr, uid,[('model','=','ir.ui.view'),('name','=','view_vat_save')], context=context) resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id'] context['file_save'] = data_of_file