[ADD] Added few more tags in xml file generated from def create_xml of l10n_be/wizard/l10n_be_account_vat_declaration.py file
bzr revid: bde@tinyerp.com-20120116131923-zvt82geq51dvigyl
This commit is contained in:
parent
03b71051fb
commit
2c845a30f5
|
@ -84,12 +84,26 @@ class l10n_be_vat_declaration(osv.osv_memory):
|
|||
address = post_code = city = country_code = ''
|
||||
city, post_code, address, country_code = self.pool.get('res.company')._get_default_ad(obj_company.partner_id.address)
|
||||
|
||||
name = obj_company.partner_id.address[0].name
|
||||
email = obj_company.partner_id.address[0].email
|
||||
phone = obj_company.partner_id.address[0].phone
|
||||
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 = '<?xml version="1.0"?>\n<VATConsignment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="MultiDeclarationTVA-NoSignature-16.xml">'
|
||||
data_of_file +='\n\t<VATDeclaration>'
|
||||
data_of_file +='\n\t\t<Declarant>\n\t\t\t<VATNUMBER xmlns="http://www.minfin.fgov.be/InputCommon">'+str(vat_no)+'</VATNUMBER>\n\t\t</Declarant>'
|
||||
data_of_file = '<?xml version="1.0"?>\n<VATConsignment VATDeclarationsNbr="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="MultiDeclarationTVA-NoSignature-16.xml">'
|
||||
data_of_file +='\n\t<Representative>'+ obj_company.name +'</Representative>'
|
||||
data_of_file +='\n\t<RepresentativeReference>'+ send_ref +'</RepresentativeReference>'
|
||||
data_of_file +='\n\t<VATDeclaration SequenceNumber="1" DeclarantReference="">'
|
||||
data_of_file +='\n\t\t<ReplacedVATDeclaration>''</ReplacedVATDeclaration>'
|
||||
data_of_file +='\n\t\t<Declarant>\n\t\t\t<VATNUMBER xmlns="http://www.minfin.fgov.be/InputCommon">'+str(vat_no)+'</VATNUMBER>'
|
||||
data_of_file +='\n\t\t\t<Name>'+name+'</Name>'
|
||||
data_of_file +='\n\t\t\t<Street>'+address+'</Street>'
|
||||
data_of_file +='\n\t\t\t<PostCode>'+post_code+'</PostCode>'
|
||||
data_of_file +='\n\t\t\t<City>'+city+'</City>'
|
||||
data_of_file +='\n\t\t\t<CountryCode>'+country_code+'</CountryCode>'
|
||||
data_of_file +='\n\t\t\t<EmailAddress>'+email+'</EmailAddress>'
|
||||
data_of_file +='\n\t\t\t<Phone>'+phone+'</Phone>'
|
||||
data_of_file +='\n\t\t</Declarant>'
|
||||
data_of_file +='\n\t\t<Period>\n\t\t'
|
||||
|
||||
starting_month = account_period.date_start[5:7]
|
||||
|
@ -125,7 +139,9 @@ class l10n_be_vat_declaration(osv.osv_memory):
|
|||
data_of_file +='\n\t\t\t</Amount>\t'
|
||||
data_of_file += '\n\t\t</Data>'
|
||||
data_of_file += '\n\t\t<ClientListingNihil>'+ (data['client_nihil'] and 'YES' or 'NO') +'</ClientListingNihil>'
|
||||
data_of_file += '\n\t\t<ASK Restitution="' + (data['ask_restitution'] and 'YES' or 'NO') + '" Payment="' + (data['ask_payment'] and 'YES' or 'NO') +'"/>'
|
||||
data_of_file += '\n\t\t<Ask Restitution="' + (data['ask_restitution'] and 'YES' or 'NO') + '" Payment="' + (data['ask_payment'] and 'YES' or 'NO') +'"/>'
|
||||
data_of_file +='\n\t\t<FileAttachment>''</FileAttachment>'
|
||||
data_of_file +='\n\t\t<Comment>''</Comment>'
|
||||
data_of_file += '\n\t</VATDeclaration> \n</VATConsignment>'
|
||||
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']
|
||||
|
|
Loading…
Reference in New Issue