Merge lp:~openerp-dev/openobject-addons/6.1-opw-590132-nep into lp:openobject-addons/6.1

Proposed by Nehal Panchal (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-590132-nep
Merge into: lp:openobject-addons/6.1
Diff against target: 11 lines (+1/-0)
1 file modified
account/account_move_line.py (+1/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-590132-nep
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+155414@code.launchpad.net

Description of the change

Hello,

If you edit Journal Items (when "Centralised Counterpart" is True for the jouranl which is used in Journal Items) raises the traceback.

Steps to reproduce:
1. In Accounting > Configuration > Financial accounting > Journals > Journals, check that the journal "Opening entries journal" has the option "Centralized Counterpart" = True and it has a "Default Debit Account" and a "Default Credit Account".
2. Go to Accounting > Journal entries > Journal Items and set Journal = "Opening entries journal" and period = "03/2013" and click on "Filter"
3. Enter a line (enter some text in the "Reference" field) and save it.
4. Select a created line and modify the content of the field "Reference"

This fixes the issue.

Thanks

To post a comment you must log in.
Revision history for this message
Chris Biersbach (OpenERP) (cbi-openerp) wrote :

I am rejecting this because 6.1 is not an LTS and we thus no longer merge in 6.1.

Unmerged revisions

7193. By Nehal Panchal (OpenERP)

[FIX] account : Crash when using a Centralised journal

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 2012-09-06 14:35:17 +0000
+++ account/account_move_line.py 2013-03-26 07:15:26 +0000
@@ -1112,6 +1112,7 @@
1112 # use the first move ever created for this journal and period1112 # use the first move ever created for this journal and period
1113 if context is None:1113 if context is None:
1114 context = {}1114 context = {}
1115 context = self.convert_to_period(cr, uid, context=context)
1115 cr.execute('SELECT id, state, name FROM account_move WHERE journal_id = %s AND period_id = %s ORDER BY id limit 1', (context['journal_id'],context['period_id']))1116 cr.execute('SELECT id, state, name FROM account_move WHERE journal_id = %s AND period_id = %s ORDER BY id limit 1', (context['journal_id'],context['period_id']))
1116 res = cr.fetchone()1117 res = cr.fetchone()
1117 if res:1118 if res: