Merge lp:~openerp-dev/openobject-addons/trunk-opw-576447-port-mma into lp:openobject-addons

Proposed by Mayur Maheshwari(OpenERP)
Status: Merged
Merged at revision: 8001
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-opw-576447-port-mma
Merge into: lp:openobject-addons
Diff against target: 13 lines (+3/-0)
1 file modified
account_voucher/account_voucher.py (+3/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-opw-576447-port-mma
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+132488@code.launchpad.net

Description of the change

Hello,

"[FIX]: while paying the invoice of selected journal in voucher has inactive sequence that will throw the traceback it should raise warning"

Stpes to reproduce:

1). Goto : Accounting/Configuration/Financial Accounting/Journals/Journals, Select "Bank Journal - (test)" journal
2). Open Entry sequence of above journal ,inactive it and save it.
3). Create invoice, validate and click on payment button the voucher will be opened.
4). Now select the above journal which has inactive sequence and try to validate the voucher

   You will get the trace-back it should raise the warning message.
   Code is forward port from 6.1

Thanks
Mayur

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_voucher/account_voucher.py'
2--- account_voucher/account_voucher.py 2012-10-29 09:17:13 +0000
3+++ account_voucher/account_voucher.py 2012-11-01 09:55:23 +0000
4@@ -953,6 +953,9 @@
5 if voucher_brw.number:
6 name = voucher_brw.number
7 elif voucher_brw.journal_id.sequence_id:
8+ if not voucher_brw.journal_id.sequence_id.active:
9+ raise osv.except_osv(_('Configuration Error !'),
10+ _('Please activate the sequence of selected journal !'))
11 name = seq_obj.next_by_id(cr, uid, voucher_brw.journal_id.sequence_id.id, context=context)
12 else:
13 raise osv.except_osv(_('Error!'),

Subscribers

People subscribed via source and target branches

to all changes: