← Back to team overview

openerp-dev-web team mailing list archive

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

 

Purnendu Singh (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/6.0-opw-4823-psi into lp:openobject-addons/6.0.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #744789 in OpenERP Addons: "[V6] Third party ledger : Initial Balance"
  https://bugs.launchpad.net/openobject-addons/+bug/744789

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-4823-psi/+merge/56325

Hello,

Fixes:
https://bugs.launchpad.net/openobject-addons/+bug/744789

Thanks,
Purnendu Singh
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-4823-psi/+merge/56325
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/6.0-opw-4823-psi.
=== 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 @@
                     periods = ','.join([str(x) for x in periods])
                     if periods:
                         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)
+                    else:
+                        where_move_lines_by_date = " AND " +obj+".move_id IN (SELECT id FROM account_move WHERE date < '" +first_period.date_start+"')"
+                        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)
             else:
                 ids = ','.join([str(x) for x in context['periods']])
                 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)

=== 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 @@
     def onchange_filter(self, cr, uid, ids, filter='filter_no', fiscalyear_id=False, context=None):
         res = {}
         if filter == 'filter_no':
-            res['value'] = {'period_from': False, 'period_to': False, 'date_from': False ,'date_to': False}
+            res['value'] = {'period_from': False, 'period_to': False, 'date_from': False , 'date_to': False, 'initial_balance': False}
         if filter == 'filter_date':
             res['value'] = {'period_from': False, 'period_to': False, 'date_from': time.strftime('%Y-01-01'), 'date_to': time.strftime('%Y-%m-%d')}
         if filter == 'filter_period' and fiscalyear_id:

=== 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 @@
                 <field name="display_account"/>
                 <field name="sortby"/>
                 <field name="landscape"/>
-                <field name="initial_balance" attrs="{'readonly':[('fiscalyear_id','=', False)]}"/>
+                <field name="initial_balance" attrs="{'readonly':['|',('fiscalyear_id','=', False), ('filter', '=', 'filter_no')]}"/>
                 <field name="amount_currency"/>
                 <newline/>
             </xpath>

=== 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 @@
     }
     _defaults = {
        'reconcil': True,
-       'initial_balance': True,
+       'initial_balance': False,
        'page_split': False,
     }
 

=== 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 @@
             </xpath>
             <xpath expr="//field[@name='target_move']" position="after">
                 <field name="result_selection"/>
-                <field name="initial_balance"/>
+                <field name="initial_balance" attrs="{'readonly':[('filter', '=', 'filter_no')]}"/>
                 <field name="reconcil"/>
                 <field name="amount_currency"/>
                 <field name="page_split"/>


Follow ups