Merge lp:~openerp-dev/openobject-addons/7.0-opw-593487-rgo into lp:openobject-addons/7.0

Proposed by Ravi Gohil (OpenERP)
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 9203
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-593487-rgo
Merge into: lp:openobject-addons/7.0
Diff against target: 12 lines (+1/-1)
1 file modified
account/account_move_line.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-593487-rgo
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Review via email: mp+168024@code.launchpad.net

Description of the change

Hi,

One must not be able to delete the 'Journal Items' if it belongs to the entry which is in posted state.

Currently, it is possible to delete the journal items if the particular journal is configured with "Skip 'Draft' State for Manual Entries" field to True.

This branch will fix this issue, kindly review it.

Thanks.

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve

Unmerged revisions

9203. By Ravi Gohil (OpenERP)

[FIX] Account: One must not be able to delete the 'Journal Items' when it belongs the entry which is in posted state. (Maintenance Case: 593487)

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 2013-04-25 12:44:53 +0000
3+++ account/account_move_line.py 2013-06-07 11:46:15 +0000
4@@ -1115,7 +1115,7 @@
5 done = {}
6 for line in self.browse(cr, uid, ids, context=context):
7 err_msg = _('Move name (id): %s (%s)') % (line.move_id.name, str(line.move_id.id))
8- if line.move_id.state <> 'draft' and (not line.journal_id.entry_posted):
9+ if line.move_id.state <> 'draft':
10 raise osv.except_osv(_('Error!'), _('You cannot do this modification on a confirmed entry. You can just change some non legal fields or you must unconfirm the journal entry first.\n%s.') % err_msg)
11 if line.reconcile_id:
12 raise osv.except_osv(_('Error!'), _('You cannot do this modification on a reconciled entry. You can just change some non legal fields or you must unreconcile first.\n%s.') % err_msg)