Merge lp:~openerp-dev/openobject-addons/6.0-opw-4823-psi into lp:openobject-addons/6.0

Proposed by Purnendu Singh (OpenERP)
Status: Rejected
Rejected by: Jay Vora (Serpent Consulting Services)
Proposed branch: lp:~openerp-dev/openobject-addons/6.0-opw-4823-psi
Merge into: lp:openobject-addons/6.0
Diff against target: 65 lines (+7/-4)
5 files modified
account/account_move_line.py (+3/-0)
account/wizard/account_report_common.py (+1/-1)
account/wizard/account_report_general_ledger_view.xml (+1/-1)
account/wizard/account_report_partner_ledger.py (+1/-1)
account/wizard/account_report_partner_ledger_view.xml (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.0-opw-4823-psi
Reviewer Review Type Date Requested Status
Jay Vora (Serpent Consulting Services) (community) Needs Fixing
Review via email: mp+56325@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Purnendu,

Thanks for the proposal.

Things seem better now and we need few improvements like constraint for the 'initial balance' field, not allowing date range,period range out of the selected fiscal year.

Thanks again for your work.

review: Needs Fixing
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Thanks for your work Purnendu.
Corrected merge proposal has been added by Somesh as https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-4823-skh/+merge/63531.

Hence, I reject this for the sake of clarity.

Thanks.

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 2011-01-20 14:02:14 +0000
3+++ account/account_move_line.py 2011-04-05 10:52:56 +0000
4@@ -87,6 +87,9 @@
5 periods = ','.join([str(x) for x in periods])
6 if periods:
7 query = obj+".state <> 'draft' AND "+obj+".period_id IN (SELECT id FROM account_period WHERE fiscalyear_id IN (%s) AND id IN (%s)) %s %s" % (fiscalyear_clause, periods, where_move_state, where_move_lines_by_date)
8+ else:
9+ where_move_lines_by_date = " AND " +obj+".move_id IN (SELECT id FROM account_move WHERE date < '" +first_period.date_start+"')"
10+ query = obj+".state <> 'draft' AND "+obj+".period_id IN (SELECT id FROM account_period WHERE fiscalyear_id IN (%s)) %s %s" % (fiscalyear_clause, where_move_state, where_move_lines_by_date)
11 else:
12 ids = ','.join([str(x) for x in context['periods']])
13 query = obj+".state <> 'draft' AND "+obj+".period_id IN (SELECT id FROM account_period WHERE fiscalyear_id IN (%s) AND id IN (%s)) %s %s" % (fiscalyear_clause, ids, where_move_state, where_move_lines_by_date)
14
15=== modified file 'account/wizard/account_report_common.py'
16--- account/wizard/account_report_common.py 2011-01-14 00:11:01 +0000
17+++ account/wizard/account_report_common.py 2011-04-05 10:52:56 +0000
18@@ -58,7 +58,7 @@
19 def onchange_filter(self, cr, uid, ids, filter='filter_no', fiscalyear_id=False, context=None):
20 res = {}
21 if filter == 'filter_no':
22- res['value'] = {'period_from': False, 'period_to': False, 'date_from': False ,'date_to': False}
23+ res['value'] = {'period_from': False, 'period_to': False, 'date_from': False , 'date_to': False, 'initial_balance': False}
24 if filter == 'filter_date':
25 res['value'] = {'period_from': False, 'period_to': False, 'date_from': time.strftime('%Y-01-01'), 'date_to': time.strftime('%Y-%m-%d')}
26 if filter == 'filter_period' and fiscalyear_id:
27
28=== modified file 'account/wizard/account_report_general_ledger_view.xml'
29--- account/wizard/account_report_general_ledger_view.xml 2011-01-14 00:11:01 +0000
30+++ account/wizard/account_report_general_ledger_view.xml 2011-04-05 10:52:56 +0000
31@@ -17,7 +17,7 @@
32 <field name="display_account"/>
33 <field name="sortby"/>
34 <field name="landscape"/>
35- <field name="initial_balance" attrs="{'readonly':[('fiscalyear_id','=', False)]}"/>
36+ <field name="initial_balance" attrs="{'readonly':['|',('fiscalyear_id','=', False), ('filter', '=', 'filter_no')]}"/>
37 <field name="amount_currency"/>
38 <newline/>
39 </xpath>
40
41=== modified file 'account/wizard/account_report_partner_ledger.py'
42--- account/wizard/account_report_partner_ledger.py 2011-01-14 00:11:01 +0000
43+++ account/wizard/account_report_partner_ledger.py 2011-04-05 10:52:56 +0000
44@@ -39,7 +39,7 @@
45 }
46 _defaults = {
47 'reconcil': True,
48- 'initial_balance': True,
49+ 'initial_balance': False,
50 'page_split': False,
51 }
52
53
54=== modified file 'account/wizard/account_report_partner_ledger_view.xml'
55--- account/wizard/account_report_partner_ledger_view.xml 2011-01-14 00:11:01 +0000
56+++ account/wizard/account_report_partner_ledger_view.xml 2011-04-05 10:52:56 +0000
57@@ -15,7 +15,7 @@
58 </xpath>
59 <xpath expr="//field[@name='target_move']" position="after">
60 <field name="result_selection"/>
61- <field name="initial_balance"/>
62+ <field name="initial_balance" attrs="{'readonly':[('filter', '=', 'filter_no')]}"/>
63 <field name="reconcil"/>
64 <field name="amount_currency"/>
65 <field name="page_split"/>