[IMP] account: entries analysis improvement
bzr revid: qdp-launchpad@tinyerp.com-20100916152510-efxsemur24plb6pt
This commit is contained in:
parent
be2f05745f
commit
d038e3ae85
|
@ -21,6 +21,7 @@
|
|||
|
||||
import tools
|
||||
from osv import fields,osv
|
||||
import decimal_precision as dp
|
||||
|
||||
class account_entries_report(osv.osv):
|
||||
_name = "account.entries.report"
|
||||
|
@ -39,6 +40,8 @@ class account_entries_report(osv.osv):
|
|||
'day': fields.char('Day', size=128, readonly=True),
|
||||
'year': fields.char('Year', size=4, readonly=True),
|
||||
'date': fields.date('Date', size=128, readonly=True),
|
||||
'currency_id': fields.many2one('res.currency', 'Currency', readonly=True),
|
||||
'amount_currency': fields.float('Amount Currency', digits_compute=dp.get_precision('Account'), readonly=True),
|
||||
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
|
||||
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
|
||||
('10','October'), ('11','November'), ('12','December')], 'Month', readonly=True),
|
||||
|
@ -68,6 +71,7 @@ class account_entries_report(osv.osv):
|
|||
"partners accounts (for debit/credit computations), closed for depreciated accounts."),
|
||||
'company_id': fields.many2one('res.company', 'Company', readonly=True),
|
||||
}
|
||||
|
||||
_order = 'date desc'
|
||||
|
||||
def search(self, cr, uid, args, offset=0, limit=None, order=None,
|
||||
|
@ -133,6 +137,8 @@ class account_entries_report(osv.osv):
|
|||
a.user_type as user_type,
|
||||
1 as nbr,
|
||||
l.quantity as quantity,
|
||||
l.currency_id as currency_id,
|
||||
l.amount_currency as amount_currency,
|
||||
l.debit as debit,
|
||||
l.credit as credit,
|
||||
l.debit-l.credit as balance
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
<field name="ref" invisible="1"/>
|
||||
<field name="nbr" sum="# of Entries "/>
|
||||
<field name="quantity" sum="# of Products Qty "/>
|
||||
<field name="amount_currency" invisible="not context.get('amount_currency_visible', False)"/>
|
||||
<field name="currency_id" invisible="not context.get('currency_id_visible', False)"/>
|
||||
<field name="debit"/>
|
||||
<field name="credit"/>
|
||||
<field name="balance"/>
|
||||
|
@ -77,20 +79,18 @@
|
|||
<separator orientation="vertical"/>
|
||||
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Currency" name="group_currency" icon="terp-dolar" context="{'group_by':'currency_id', 'currency_id_visible':1, 'amount_currency_visible':1}"/>
|
||||
<filter string="Journal" name="group_journal" icon="terp-folder-orange" context="{'group_by':'journal_id'}"/>
|
||||
<filter string="Account" name="group_account" icon="terp-folder-green" context="{'group_by':'account_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Type" icon="terp-stock_symbol-selection" context="{'group_by':'user_type'}"/>
|
||||
<filter string="Int.Type" icon="terp-stock_symbol-selection" context="{'group_by':'type'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Period" icon="terp-go-month" name="group_period" context="{'group_by':'period_id'}"/>
|
||||
<filter string="Fiscal Year" icon="terp-go-month" context="{'group_by':'fiscalyear_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Acc.Type" icon="terp-folder-blue" context="{'group_by':'user_type'}"/>
|
||||
<filter string="Int.Type" icon="terp-folder-yellow" context="{'group_by':'type'}"/>
|
||||
<separator orientation="vertical" groups="base.group_multi_company"/>
|
||||
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Date" icon="terp-go-today" context="{'group_by':'date'}"/>
|
||||
<filter string="Period" icon="terp-go-month" name="group_period" context="{'group_by':'period_id'}"/>
|
||||
<filter string="Fiscal Year" icon="terp-go-year" context="{'group_by':'fiscalyear_id'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Filters..." groups="base.group_extended">
|
||||
|
|
Loading…
Reference in New Issue