summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorQuentin (OpenERP) <qdp-launchpad@openerp.com>2012-02-08 12:22:23 +0100
committerQuentin (OpenERP) <qdp-launchpad@openerp.com>2012-02-08 12:22:23 +0100
commitd9aab1caee76ad83c2bf2bcb1a7cb2b87ede64db (patch)
tree8ffbf0b0b93d9771cef72d359cceae4ec53f1883 /addons
parentc88f14efdf97890412e34dd5f7e0b385b094cbe8 (diff)
[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
Diffstat (limited to 'addons')
-rw-r--r--addons/l10n_be/wizard/l10n_be_account_vat_declaration.py4
1 files changed, 4 insertions, 0 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 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(),