Merge lp:~openerp-dev/openobject-addons/6.1-opw-577781-skh into lp:openobject-addons/6.1

Proposed by Somesh Khare
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-577781-skh
Merge into: lp:openobject-addons/6.1
Diff against target: 35 lines (+7/-1)
1 file modified
account/account_move_line.py (+7/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-577781-skh
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+119522@code.launchpad.net

Description of the change

Hello Sir,

[FIX] account_move_line: journal view on the journal form did not work.

Steps to Reproduce:
1. Create a Journal View "Test View" and select field as "move,ref,state,account" from menu "Accounting/Configuration/Financial Accounting/Journals/Journal Views".
2. Select any journal from "Accounting/Configuration/Financial Accounting/Journals/Journals" (eg: Sales Journal).
3. Now select the Display mode as "Test View" on the Journal form view.
4. From the action window select Journal Item.

Your selected display mode's (Journal Views) fields are not visible on the journal items from here.

Expected result:
It should display only the fields those are defined into the Journal View "Test View".

This branch fixes this issue, Kindly review the branch and please share your views on it.

Thanks,
Somesh Khare

To post a comment you must log in.
6947. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

6948. By Somesh Khare

[FIX]account_move_line: journal view on the journal form did not work (Case: Ref 577781)

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). 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

6948. By Somesh Khare

[FIX]account_move_line: journal view on the journal form did not work (Case: Ref 577781)

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-07-27 11:43:03 +0000
3+++ account/account_move_line.py 2012-08-16 11:36:20 +0000
4@@ -20,6 +20,7 @@
5 ##############################################################################
6
7 import time
8+import sys
9 from datetime import datetime
10 from operator import itemgetter
11
12@@ -1016,8 +1017,11 @@
13 fields = {}
14 flds = []
15 title = _("Accounting Entries") #self.view_header_get(cr, uid, view_id, view_type, context)
16-
17+
18 ids = journal_pool.search(cr, uid, [])
19+ journal_id = context.get('active_model')=='account.journal' and context.get('active_id') or context.get('search_default_journal_id') or False
20+ if journal_id:
21+ ids = journal_pool.search(cr, uid, [('id','=',journal_id)])
22 journals = journal_pool.browse(cr, uid, ids, context=context)
23 all_journal = [None]
24 common_fields = {}
25@@ -1035,8 +1039,10 @@
26 common_fields[field.field] = common_fields[field.field] + 1
27 fld.append(('period_id', 3))
28 fld.append(('journal_id', 10))
29+ fld.append(('state',sys.maxint))
30 flds.append('period_id')
31 flds.append('journal_id')
32+ flds.append('state')
33 fields['period_id'] = all_journal
34 fields['journal_id'] = all_journal
35 fld = sorted(fld, key=itemgetter(1))