Merge lp:~openerp-dev/openobject-addons/7.0-opw-606923-rha into lp:openobject-addons/7.0

Proposed by Rifakat Husen (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-606923-rha
Merge into: lp:openobject-addons/7.0
Diff against target: 14 lines (+3/-1)
1 file modified
account/account_move_line.py (+3/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-606923-rha
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+218244@code.launchpad.net

Description of the change

While running opening entries generation wizard second time, it raises warning due to a constraint on Reconciliation object.

It's better to show a meaningful warning to user to use "Cancel Closing Entries" wizard to remove those opening entries and then generate opening entries.

To post a comment you must log in.

Unmerged revisions

10019. By Rifakat Husen (OpenERP)

[FIX] account: raise meaningful warning when running opening entries wizard second time,
a constraint doesn't let the opening entries wizard run second time,so rainsed warning to cancel those entries and then run the wizard
again

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/account_move_line.py'
2--- account/account_move_line.py 2014-04-22 10:11:28 +0000
3+++ account/account_move_line.py 2014-05-05 05:16:42 +0000
4@@ -1027,7 +1027,9 @@
5 all_moves = list(set(all_moves) - set(move_ids))
6 if unlink_ids:
7 if opening_reconciliation:
8- obj_move_rec.write(cr, uid, unlink_ids, {'opening_reconciliation': False})
9+ raise osv.except_osv(_('Warning!'),
10+ _('Opening Entries have already been generated.'\
11+ ' Please run "Cancel Closing Entries" wizard to cancel those entries and then run this wizard.'))
12 obj_move_rec.unlink(cr, uid, unlink_ids)
13 if all_moves:
14 obj_move_line.reconcile_partial(cr, uid, all_moves, 'auto',context=context)