Merge lp:~openerp-dev/openobject-addons/trunk-bug-1011178-rmu into lp:openobject-addons

Proposed by Ravish(OpenERP)
Status: Merged
Merged at revision: 7639
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1011178-rmu
Merge into: lp:openobject-addons
Diff against target: 19 lines (+3/-3)
1 file modified
account/account_move_line.py (+3/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1011178-rmu
Reviewer Review Type Date Requested Status
Amit Parik (community) Approve
Ravish(OpenERP) (community) Needs Resubmitting
OpenERP Core Team Pending
Review via email: mp+109610@code.launchpad.net

This proposal supersedes a proposal from 2012-06-11.

Description of the change

Hello,

I have improved the error message in account move line's _update_journal_check method .This will raise when you try to create entry for period which is already closed .

Thanks..!!!

To post a comment you must log in.
Revision history for this message
Amit Parik (amit-parik) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Amit Parik (amit-parik) wrote : Posted in a previous version of this proposal

Hello Ravish,

Remove the indentation problem.

Next time don't do this kind of silly mistake, even you are applying a patch then you have to first apply the patch at your end I know the given patch has same mistake but don't repeat it.

Please be careful for next time because it's not good as a developer you are doing a indentation 's mistake.

Thanks!

review: Needs Fixing
Revision history for this message
Ravish(OpenERP) (rmu-openerp) wrote :

Hello Sir,

Improved the code

Thanks.!!!

review: Needs Resubmitting
Revision history for this message
Amit Parik (amit-parik) :
review: Approve

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 2012-08-07 11:34:14 +0000
3+++ account/account_move_line.py 2012-08-23 13:36:24 +0000
4@@ -1184,12 +1184,12 @@
5 jour_period_obj = self.pool.get('account.journal.period')
6 cr.execute('SELECT state FROM account_journal_period WHERE journal_id = %s AND period_id = %s', (journal_id, period_id))
7 result = cr.fetchall()
8+ journal = journal_obj.browse(cr, uid, journal_id, context=context)
9+ period = period_obj.browse(cr, uid, period_id, context=context)
10 for (state,) in result:
11 if state == 'done':
12- raise osv.except_osv(_('Error!'), _('You cannot add/modify entries in a closed journal.'))
13+ raise osv.except_osv(_('Error !'), _('You can not add/modify entries in a closed period %s of journal %s.' % (period.name,journal.name)))
14 if not result:
15- journal = journal_obj.browse(cr, uid, journal_id, context=context)
16- period = period_obj.browse(cr, uid, period_id, context=context)
17 jour_period_obj.create(cr, uid, {
18 'name': (journal.code or journal.name)+':'+(period.name or ''),
19 'journal_id': journal.id,

Subscribers

People subscribed via source and target branches

to all changes: