From d9aab1caee76ad83c2bf2bcb1a7cb2b87ede64db Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Wed, 8 Feb 2012 12:22:23 +0100 Subject: [PATCH] [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 --- addons/l10n_be/wizard/l10n_be_account_vat_declaration.py | 4 ++++ 1 file changed, 4 insertions(+) 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 4446ca6cb6e..b666006e782 100644 --- a/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py +++ b/addons/l10n_be/wizard/l10n_be_account_vat_declaration.py @@ -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(),