diff options
| author | Bharat Devnani (OpenERP) <bde@tinyerp.com> | 2012-01-16 18:49:23 +0530 |
|---|---|---|
| committer | Bharat Devnani (OpenERP) <bde@tinyerp.com> | 2012-01-16 18:49:23 +0530 |
| commit | 2c845a30f5d1a8a58b0a616d8d79f0dc00de7c7d (patch) | |
| tree | d3f97d7a3efa6d13d88f8efd916a331f3ba61ee7 | |
| parent | 03b71051fb1d4f655c5647c1f7127fec240fe2af (diff) | |
[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
| -rw-r--r-- | addons/l10n_be/wizard/l10n_be_account_vat_declaration.py | 24 |
1 files changed, 20 insertions, 4 deletions
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 fb7352e7974..a9933b9ead9 100644 --- a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py +++ b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py @@ -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'] |
