From e782d6fb3c5fe523458642bb4bb05be9aeb24500 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Thu, 1 Nov 2012 15:20:33 +0530 Subject: [PATCH] [FIX]account_voucher: while paying the invoice of selected journal in voucher has inactive sequence that will throw the traceback it should raise warning bzr revid: mma@tinyerp.com-20121101095033-enb2bmc43xox1n6i --- addons/account_voucher/account_voucher.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index e1caf190316..5d6dc91a520 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -953,6 +953,9 @@ class account_voucher(osv.osv): if voucher_brw.number: name = voucher_brw.number elif voucher_brw.journal_id.sequence_id: + if not voucher_brw.journal_id.sequence_id.active: + raise osv.except_osv(_('Configuration Error !'), + _('Please activate the sequence of selected journal !')) name = seq_obj.next_by_id(cr, uid, voucher_brw.journal_id.sequence_id.id, context=context) else: raise osv.except_osv(_('Error!'),