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
=== modified file 'account/account_move_line.py'
--- account/account_move_line.py 2011-01-20 14:02:14 +0000
+++ account/account_move_line.py 2011-04-05 10:52:56 +0000
@@ -87,6 +87,9 @@
87 periods = ','.join([str(x) for x in periods])87 periods = ','.join([str(x) for x in periods])
88 if periods:88 if periods:
89 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)89 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)
90 else:
91 where_move_lines_by_date = " AND " +obj+".move_id IN (SELECT id FROM account_move WHERE date < '" +first_period.date_start+"')"
92 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)
90 else:93 else:
91 ids = ','.join([str(x) for x in context['periods']])94 ids = ','.join([str(x) for x in context['periods']])
92 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)95 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)
9396
=== modified file 'account/wizard/account_report_common.py'
--- account/wizard/account_report_common.py 2011-01-14 00:11:01 +0000
+++ account/wizard/account_report_common.py 2011-04-05 10:52:56 +0000
@@ -58,7 +58,7 @@
58 def onchange_filter(self, cr, uid, ids, filter='filter_no', fiscalyear_id=False, context=None):58 def onchange_filter(self, cr, uid, ids, filter='filter_no', fiscalyear_id=False, context=None):
59 res = {}59 res = {}
60 if filter == 'filter_no':60 if filter == 'filter_no':
61 res['value'] = {'period_from': False, 'period_to': False, 'date_from': False ,'date_to': False}61 res['value'] = {'period_from': False, 'period_to': False, 'date_from': False , 'date_to': False, 'initial_balance': False}
62 if filter == 'filter_date':62 if filter == 'filter_date':
63 res['value'] = {'period_from': False, 'period_to': False, 'date_from': time.strftime('%Y-01-01'), 'date_to': time.strftime('%Y-%m-%d')}63 res['value'] = {'period_from': False, 'period_to': False, 'date_from': time.strftime('%Y-01-01'), 'date_to': time.strftime('%Y-%m-%d')}
64 if filter == 'filter_period' and fiscalyear_id:64 if filter == 'filter_period' and fiscalyear_id:
6565
=== modified file 'account/wizard/account_report_general_ledger_view.xml'
--- account/wizard/account_report_general_ledger_view.xml 2011-01-14 00:11:01 +0000
+++ account/wizard/account_report_general_ledger_view.xml 2011-04-05 10:52:56 +0000
@@ -17,7 +17,7 @@
17 <field name="display_account"/>17 <field name="display_account"/>
18 <field name="sortby"/>18 <field name="sortby"/>
19 <field name="landscape"/>19 <field name="landscape"/>
20 <field name="initial_balance" attrs="{'readonly':[('fiscalyear_id','=', False)]}"/>20 <field name="initial_balance" attrs="{'readonly':['|',('fiscalyear_id','=', False), ('filter', '=', 'filter_no')]}"/>
21 <field name="amount_currency"/>21 <field name="amount_currency"/>
22 <newline/>22 <newline/>
23 </xpath>23 </xpath>
2424
=== modified file 'account/wizard/account_report_partner_ledger.py'
--- account/wizard/account_report_partner_ledger.py 2011-01-14 00:11:01 +0000
+++ account/wizard/account_report_partner_ledger.py 2011-04-05 10:52:56 +0000
@@ -39,7 +39,7 @@
39 }39 }
40 _defaults = {40 _defaults = {
41 'reconcil': True,41 'reconcil': True,
42 'initial_balance': True,42 'initial_balance': False,
43 'page_split': False,43 'page_split': False,
44 }44 }
4545
4646
=== modified file 'account/wizard/account_report_partner_ledger_view.xml'
--- account/wizard/account_report_partner_ledger_view.xml 2011-01-14 00:11:01 +0000
+++ account/wizard/account_report_partner_ledger_view.xml 2011-04-05 10:52:56 +0000
@@ -15,7 +15,7 @@
15 </xpath>15 </xpath>
16 <xpath expr="//field[@name='target_move']" position="after">16 <xpath expr="//field[@name='target_move']" position="after">
17 <field name="result_selection"/>17 <field name="result_selection"/>
18 <field name="initial_balance"/>18 <field name="initial_balance" attrs="{'readonly':[('filter', '=', 'filter_no')]}"/>
19 <field name="reconcil"/>19 <field name="reconcil"/>
20 <field name="amount_currency"/>20 <field name="amount_currency"/>
21 <field name="page_split"/>21 <field name="page_split"/>