Merge lp:~openerp-dev/openobject-addons/6.1-opw-575524-rha into lp:openobject-addons/6.1

Proposed by Rifakat Husen (OpenERP)
Status: Approved
Approved by: Naresh(OpenERP)
Approved revision: 6834
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-575524-rha
Merge into: lp:openobject-addons/6.1
Diff against target: 12 lines (+2/-0)
1 file modified
account/account_move_line.py (+2/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-575524-rha
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Review via email: mp+109119@code.launchpad.net

Description of the change

Hello,

Converted string period to id while we enter any period from the seach view for journal items.

Steps to reproduce with French chart of account:
1. Open Journal Items, provide journal 'Bank' and period '06/2012' from search
2. Create new journal item,
   Reference: Test
   Account: 401100
   Name: Test
   Debit: 100
3. Press enter, it will generate remaining lines automaticallly
4. Now try to change 'Reference' and press enter, It will raise error.

It is due to period passed through context is in string '06/2012', which should be
converted to appropriate id.

Kindly review this fix.

Regards,
Rifakat Haradwala

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

Hello,

This bug was qualified as Not Relevant on Trunk (means that architecture on trunk has changed and so this bug has no meaning anymore). i.e the way of evaluation of context and domain is changed. If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

Unmerged revisions

6834. By Rifakat Husen (OpenERP)

[FIX] account: converted string period to id if we get period from context as string

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-03-06 16:10:40 +0000
3+++ account/account_move_line.py 2012-06-07 11:59:22 +0000
4@@ -1170,6 +1170,8 @@
5 ctx['period_id'] = line.move_id.period_id.id
6 else:
7 ctx['period_id'] = line.period_id.id
8+ else:
9+ ctx = self.convert_to_period(cr, uid, ctx)
10 #Check for centralisation
11 journal = journal_obj.browse(cr, uid, ctx['journal_id'], context=ctx)
12 if journal.centralisation: