[FIX] l10n_be: fixed vat declaration wizard in order to handle correctly the flags ask_restitution and ask_payment + fixed typo in fieldname. Thanks Noviat for the patch

bzr revid: qdp-launchpad@openerp.com-20110505150241-e1o9cazksc8ccynp
This commit is contained in:
Noviat 2011-05-05 17:02:41 +02:00 committed by Quentin (OpenERP)
parent 14d5ac1cf1
commit eb43dce821
2 changed files with 4 additions and 3 deletions

View File

@ -44,7 +44,7 @@ class l10n_be_vat_declaration(osv.osv_memory):
'tax_code_id': fields.many2one('account.tax.code', 'Tax Code', domain=[('parent_id', '=', False)]),
'msg': fields.text('File created', size=64, readonly=True),
'file_save': fields.binary('Save File'),
'ask_resitution': fields.boolean('Ask Restitution',help='It indicates whether a resitution is to made or not?'),
'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'),
}
@ -99,7 +99,8 @@ class l10n_be_vat_declaration(osv.osv_memory):
data_of_file += '<QUARTER>'+quarter+'</QUARTER>\n\t\t\t'
else:
data_of_file += '<MONTH>'+starting_month+'</MONTH>\n\t\t\t'
data_of_file += '<YEAR>' + str(account_period.date_stop[:4]) + '</YEAR>\n\t\t</DPERIODE>\n\t\t<ASK RESTITUTION="NO" PAYMENT="NO"/>'
data_of_file += '<YEAR>' + str(account_period.date_stop[:4]) + '</YEAR>\n\t\t</DPERIODE>\n'
data_of_file += '\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<ClientListingNihil>'+ (data['client_nihil'] and 'YES' or 'NO') +'</ClientListingNihil>'
data_of_file +='\n\t\t<DATA>\n\t\t\t<DATA_ELEM>'

View File

@ -21,7 +21,7 @@
<newline/>
</group>
<group>
<field name="ask_resitution" colspan="1"/>
<field name="ask_restitution" colspan="1"/>
<field name="ask_payment" colspan="1"/>
<field name="client_nihil" string="Is Last Declaration" colspan="1" /><label/>
</group>