[MERGE] merged branch containing bugfixes for accounting reports
authorQuentin (OpenERP) <qdp-launchpad@openerp.com>
Wed, 18 May 2011 12:59:26 +0000 (14:59 +0200)
committerQuentin (OpenERP) <qdp-launchpad@openerp.com>
Wed, 18 May 2011 12:59:26 +0000 (14:59 +0200)
bzr revid: qdp-launchpad@openerp.com-20110518125926-wrr6n75ymmtibrr1

1  2 
addons/account/account.py
addons/account/wizard/account_report_general_ledger.py
addons/account/wizard/account_report_general_ledger_view.xml
addons/account/wizard/account_report_partner_ledger.py
addons/account/wizard/account_report_partner_ledger_view.xml

Simple merge
@@@ -28,8 -28,8 +28,8 @@@ class account_report_general_ledger(osv
  
      _columns = {
          'landscape': fields.boolean("Landscape Mode"),
--        'initial_balance': fields.boolean("Include Initial Balances",
--                                          help='It adds initial balance row on report which display previous sum amount of debit/credit/balance'),
++        'initial_balance': fields.boolean('Include Initial Balances',
++                                    help='If you selected to filter by date or period, this field allow you to add a row to display the amount of debit/credit/balance that precedes the filter you\'ve set.'),
          'amount_currency': fields.boolean("With Currency", help="It adds the currency column if the currency is different then the company currency"),
          'sortby': fields.selection([('sort_date', 'Date'), ('sort_journal_partner', 'Journal & Partner')], 'Sort by', required=True),
      }
                  <field name="display_account"/>
                  <field name="sortby"/>
                  <field name="landscape"/>
                  <field name="amount_currency"/>
                  <newline/>
              </xpath>
++            <xpath expr="//field[@name='filter']" position="after">
++                <field name="initial_balance" attrs="{'readonly':[('filter', 'in', ('filter_no'))]}" />
++            </xpath>
              </data>
              </field>
          </record>
@@@ -31,15 -31,13 +31,13 @@@ class account_partner_ledger(osv.osv_me
  
      _columns = {
          'initial_balance': fields.boolean('Include Initial Balances',
--                                    help='It adds initial balance row on report which display previous sum amount of debit/credit/balance'),
-         'reconcil': fields.boolean('Include Reconciled Entries', help='Consider reconciled entries'),
-         'page_split': fields.boolean('One Partner per Page', help='Display Ledger Report with One partner per page'),
++                                    help='If you selected to filter by date or period, this field allow you to add a row to display the amount of debit/credit/balance that precedes the filter you\'ve set.'),
+         'filter': fields.selection([('filter_no', 'No Filters'), ('filter_date', 'Date'), ('filter_period', 'Periods'), ('unreconciled', 'Unreconciled Entries')], "Filter by", required=True),
+         'page_split': fields.boolean('One Partner Per Page', help='Display Ledger Report with One partner per page'),
          'amount_currency': fields.boolean("With Currency", help="It adds the currency column if the currency is different then the company currency"),
      }
      _defaults = {
-        'reconcil': True,
-        'initial_balance': True,
+        'initial_balance': False,
         'page_split': False,
      }
  
@@@ -62,4 -66,4 +66,4 @@@
  
  account_partner_ledger()
  
--# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
++# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
              </xpath>
              <xpath expr="//field[@name='target_move']" position="after">
                  <field name="result_selection"/>
-                 <field name="initial_balance"/>
-                 <field name="reconcil"/>
 -                <field name="initial_balance" attrs="{'readonly':[('filter', 'in', ('filter_no', 'unreconciled'))]}" />
                  <field name="amount_currency"/>
                  <field name="page_split"/>
                  <newline/>
              </xpath>
+             <xpath expr="//field[@name='filter']" position="replace">
 -                <field name="filter" strint="replaced" on_change="onchange_filter(filter, fiscalyear_id)" colspan="4"/>
++                <field name="filter" on_change="onchange_filter(filter, fiscalyear_id)" colspan="4"/>
++                <field name="initial_balance" attrs="{'readonly':[('filter', 'in', ('filter_no', 'unreconciled'))]}" />
+             </xpath>
              </data>
              </field>
          </record>