Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Commit

Permalink
[IMP] improve message if there is incorrect export to ebp setting
Browse files Browse the repository at this point in the history
  • Loading branch information
legalsylvain committed Sep 26, 2016
1 parent 9b8737f commit 0cb5d7d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions account_export_ebp/wizard/wizard_ebp.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,17 @@ def normalize(text):
if line.tax_code_id.ref_nb:
account_nb = account_nb + line.tax_code_id.ref_nb
else:
account_nb = account_nb +\
line.account_id.ebp_code_no_tax
if not line.account_id.ebp_code_no_tax:
raise osv.except_osv(
_('Incorrect Setting'),
_("The account %s - %s is set 'export with tax"
" suffix' but no tax suffix is defined for"
" the account.\n Move %s" % (
line.account_id.code, line.account_id.name,
line.move_id.name)))
else:
account_nb = account_nb +\
line.account_id.ebp_code_no_tax

# Check the most important fields are not above the maximum
# length so as not to export wrong data with catastrophic
Expand Down

0 comments on commit 0cb5d7d

Please sign in to comment.