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
=== modified file 'account/account_move_line.py'
--- account/account_move_line.py 2014-04-22 10:11:28 +0000
+++ account/account_move_line.py 2014-05-05 05:16:42 +0000
@@ -1027,7 +1027,9 @@
1027 all_moves = list(set(all_moves) - set(move_ids))1027 all_moves = list(set(all_moves) - set(move_ids))
1028 if unlink_ids:1028 if unlink_ids:
1029 if opening_reconciliation:1029 if opening_reconciliation:
1030 obj_move_rec.write(cr, uid, unlink_ids, {'opening_reconciliation': False})1030 raise osv.except_osv(_('Warning!'),
1031 _('Opening Entries have already been generated.'\
1032 ' Please run "Cancel Closing Entries" wizard to cancel those entries and then run this wizard.'))
1031 obj_move_rec.unlink(cr, uid, unlink_ids)1033 obj_move_rec.unlink(cr, uid, unlink_ids)
1032 if all_moves:1034 if all_moves:
1033 obj_move_line.reconcile_partial(cr, uid, all_moves, 'auto',context=context)1035 obj_move_line.reconcile_partial(cr, uid, all_moves, 'auto',context=context)