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 b666006e782..e7eaa9434d0 100644 --- a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py +++ b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py @@ -42,16 +42,14 @@ class l10n_be_vat_declaration(osv.osv_memory): _columns = { 'name': fields.char('File Name', size=32), 'period_id': fields.many2one('account.period','Period', required=True), - 'tax_code_id': fields.many2one('account.tax.code', 'Tax Code', domain=[('parent_id', '=', False)], help="Keep empty to use the user's company", required=True), + 'tax_code_id': fields.many2one('account.tax.code', 'Tax Code', domain=[('parent_id', '=', False)], required=True), 'msg': fields.text('File created', size=64, readonly=True), 'file_save': fields.binary('Save File'), 'ask_restitution': fields.boolean('Ask Restitution',help='It indicates whether a resitution is to made or not?'), 'ask_payment': fields.boolean('Ask Payment',help='It indicates whether a payment is to made or not?'), - 'client_nihil': fields.boolean('Last Declaration of Enterprise',help='Tick this case only if it concerns only the last statement on the civil or cessation of activity'), - 'vat_declarations_nbr': fields.integer('VAT Declaration Number', help="Number of periodic VAT returns in the shipment"), + 'client_nihil': fields.boolean('Last Declaration, no clients in client listing', help='Tick this case only if it concerns only the last statement on the civil or cessation of activity: ' \ + 'no clients to be included in the client listing.'), 'comments': fields.text('Comments'), - 'identification_type': fields.selection([('tin','TIN'), ('nvat','NVAT'), ('other','Other')], 'Identification Type', required=True), - 'other': fields.char('Other Qlf', size=16, help="Description of a Identification Type"), } def _get_tax_code(self, cr, uid, context=None): @@ -65,8 +63,6 @@ class l10n_be_vat_declaration(osv.osv_memory): 'msg': 'Save the File with '".xml"' extension.', 'file_save': _get_xml_data, 'name': 'vat_declaration.xml', - 'identification_type': 'nvat', - 'vat_declarations_nbr': 1, 'tax_code_id': _get_tax_code, } @@ -94,7 +90,7 @@ class l10n_be_vat_declaration(osv.osv_memory): tax_code_ids = obj_tax_code.search(cr, uid, [('parent_id','child_of',data_tax.tax_code_id.id), ('company_id','=',obj_company.id)], context=context) ctx = context.copy() data = self.read(cr, uid, ids)[0] - ctx['period_id'] = data['period_id'][0] #added context here + ctx['period_id'] = data['period_id'][0] tax_info = obj_tax_code.read(cr, uid, tax_code_ids, ['code','sum_period'], context=ctx) name = email = phone = address = post_code = city = country_code = '' @@ -103,8 +99,6 @@ class l10n_be_vat_declaration(osv.osv_memory): account_period = obj_acc_period.browse(cr, uid, data['period_id'][0], context=context) issued_by = vat_no[:2] comments = data['comments'] or '' - type = data['identification_type'] or '' - other = data['other'] or '' send_ref = str(obj_company.partner_id.id) + str(account_period.date_start[5:7]) + str(account_period.date_stop[:4]) @@ -117,10 +111,7 @@ class l10n_be_vat_declaration(osv.osv_memory): if not phone: raise osv.except_osv(_('Data Insufficient!'),_('No phone associated with the company.')) file_data = { - 'vat_declarations_nbr': str(data['vat_declarations_nbr']), - 'type': type.upper(), 'issued_by': issued_by, - 'other': other, 'vat_no': vat_no, 'only_vat': vat_no[2:], 'cmpny_name': obj_company.name, @@ -143,7 +134,7 @@ class l10n_be_vat_declaration(osv.osv_memory): data_of_file = """ - %(only_vat)s + %(only_vat)s %(cmpny_name)s %(address)s %(post_code)s @@ -165,7 +156,7 @@ class l10n_be_vat_declaration(osv.osv_memory): """ % (file_data) - + if starting_month != ending_month: #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 @@ -174,7 +165,6 @@ class l10n_be_vat_declaration(osv.osv_memory): data_of_file += '\t\t%(month)s\n\t\t' % (file_data) data_of_file += '\t%(year)s' % (file_data) data_of_file += '\n\t\t\n' - data_of_file += '\t\t\t' cases_list = [] for item in tax_info: diff --git a/addons/l10n_be/wizard/l10n_be_account_vat_declaration_view.xml b/addons/l10n_be/wizard/l10n_be_account_vat_declaration_view.xml index 7a9c2e7abb4..6e3f620f41f 100644 --- a/addons/l10n_be/wizard/l10n_be_account_vat_declaration_view.xml +++ b/addons/l10n_be/wizard/l10n_be_account_vat_declaration_view.xml @@ -18,10 +18,6 @@