[FIX] l10n_be, vat declaration: raise error if not enoguh data are filled for the main company

bzr revid: qdp-launchpad@openerp.com-20120208112223-3rmp5d70n3np82n4
This commit is contained in:
Quentin (OpenERP) 2012-02-08 12:22:23 +01:00
parent c88f14efdf
commit d9aab1caee
1 changed files with 4 additions and 0 deletions

View File

@ -112,6 +112,10 @@ class l10n_be_vat_declaration(osv.osv_memory):
ending_month = account_period.date_stop[5:7]
quarter = str(((int(starting_month) - 1) / 3) + 1)
if not email:
raise osv.except_osv(_('Data Insufficient!'),_('No email address associated with the company.'))
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(),