[IMP] account: add columns for entries report
bzr revid: nel@tinyerp.com-20100503151608-4xfib11pgasz3vv4
This commit is contained in:
parent
515ad0b902
commit
7dccf4fa5e
|
@ -29,6 +29,8 @@ class account_entries_report(osv.osv):
|
|||
_rec_name = 'date'
|
||||
_columns = {
|
||||
'date': fields.date('Date', readonly=True),
|
||||
'date_created': fields.date('Date Created', readonly=True),
|
||||
'date_maturity': fields.date('Date Maturity', readonly=True),
|
||||
'nbr':fields.integer('# of Entries', readonly=True),
|
||||
'nbl':fields.integer('# of Lines', readonly=True),
|
||||
'amount': fields.float('Amount',readonly=True),
|
||||
|
@ -39,10 +41,14 @@ class account_entries_report(osv.osv):
|
|||
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
|
||||
'ref': fields.char('Reference', size=64,readonly=True),
|
||||
'period_id': fields.many2one('account.period', 'Period', readonly=True),
|
||||
'account_id': fields.many2one('account.account', 'Account', readonly=True),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal', readonly=True),
|
||||
'product_id': fields.many2one('product.product', 'Product', readonly=True),
|
||||
'state': fields.selection([('draft','Draft'), ('posted','Posted')], 'State',readonly=True,
|
||||
help='When new account move is created the state will be \'Draft\'. When all the payments are done it will be in \'Posted\' state.'),
|
||||
'partner_id': fields.many2one('res.partner','Partner', readonly=True),
|
||||
'period_id2': fields.many2one('account.period', 'Move Line Period', readonly=True),
|
||||
'journal_id2': fields.many2one('account.journal', 'Move Line Journal', readonly=True),
|
||||
'type': fields.selection([
|
||||
('pay_voucher','Cash Payment'),
|
||||
('bank_pay_voucher','Bank Payment'),
|
||||
|
@ -73,9 +79,15 @@ class account_entries_report(osv.osv):
|
|||
to_char(am.date, 'MM') as month,
|
||||
to_char(am.date, 'YYYY-MM-DD') as day,
|
||||
am.company_id as company_id,
|
||||
l.account_id as account_id,
|
||||
l.date_created as date_created,
|
||||
l.date_maturity as date_maturity,
|
||||
am.journal_id as journal_id,
|
||||
l.journal_id as journal_id2,
|
||||
l.period_id as period_id2,
|
||||
am.period_id as period_id,
|
||||
l.partner_id as partner_id,
|
||||
l.product_id as product_id,
|
||||
am.type as type
|
||||
from
|
||||
account_move_line l
|
||||
|
@ -86,9 +98,15 @@ class account_entries_report(osv.osv):
|
|||
am.date,
|
||||
am.company_id,
|
||||
am.journal_id,
|
||||
l.journal_id,
|
||||
am.period_id,
|
||||
l.period_id,
|
||||
am.type,
|
||||
l.partner_id,
|
||||
l.product_id,
|
||||
l.date_created,
|
||||
l.date_maturity,
|
||||
l.account_id,
|
||||
l.debit
|
||||
)
|
||||
""")
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
<field name="arch" type="xml">
|
||||
<tree string="Invoices Statistics">
|
||||
<field name="date" invisible="1"/>
|
||||
<field name="date_created" invisible="1"/>
|
||||
<field name="date_maturity" invisible="1"/>
|
||||
<field name="ref" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="year" invisible="1"/>
|
||||
|
@ -17,9 +19,13 @@
|
|||
<field name="nbl" sum="# of Lines "/>
|
||||
<field name="amount" sum="# of Amount "/>
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="product_id" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="journal_id" invisible="1"/>
|
||||
<field name="journal_id2" invisible="1"/>
|
||||
<field name="account_id" invisible="1"/>
|
||||
<field name="period_id" invisible="1"/>
|
||||
<field name="period_id2" invisible="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
@ -61,8 +67,10 @@
|
|||
help = "Draft tasks"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="journal_id" widget="selection"/>
|
||||
<field name="journal_id2" widget="selection"/>
|
||||
<field name="account_id"/>
|
||||
<field name="company_id" widget="selection"/>
|
||||
<field name="partner_id" />
|
||||
<field name="partner_id" />
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options..." colspan="10" col="12">
|
||||
|
@ -72,18 +80,27 @@
|
|||
help = "Posted tasks"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="period_id" widget="selection"/>
|
||||
<field name="period_id2" widget="selection"/>
|
||||
<field name="type"/>
|
||||
<field name="product_id" />
|
||||
<newline/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="date"/>
|
||||
<field name="date_maturity"/>
|
||||
<field name="date_created"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By..." colspan="10" col="12">
|
||||
<filter string="Journal" name="Journal" icon="terp-account" context="{'group_by':'journal_id'}"/>
|
||||
<filter string="Journal of Move Line" icon="terp-account" context="{'group_by':'journal_id2'}"/>
|
||||
<filter string="Account" name="Account" icon="terp-account" context="{'group_by':'account_id'}"/>
|
||||
<filter string="Company" icon="terp-account" context="{'group_by':'company_id'}" />
|
||||
<filter string="Partner" icon="terp-account" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Product" icon="terp-account" context="{'group_by':'product_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="State" icon="terp-account" context="{'group_by':'state'}"/>
|
||||
<filter string="Period" icon="terp-account" context="{'group_by':'period_id'}"/>
|
||||
<filter string="Period of Move Line" icon="terp-account" context="{'group_by':'period_id2'}"/>
|
||||
<filter string="Type" icon="terp-account" context="{'group_by':'type'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-account" context="{'group_by':'day'}"/>
|
||||
|
|
|
@ -8,6 +8,15 @@
|
|||
name="Purchase"
|
||||
parent="base.dashboard"/>
|
||||
|
||||
<record id="purchase_draft" model="ir.actions.act_window">
|
||||
<field name="name">Draft Purchases</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">purchase.order</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('date_order','>',time.strftime('%Y-01-01 00:00:00')),('date_order','<',time.strftime('%Y-12-31 23:59:59')), ('state','=','draft')]</field>
|
||||
<field name="search_view_id" ref="purchase.purchase_order_tree"/>
|
||||
</record>
|
||||
<record id="purchase_waiting" model="ir.actions.act_window">
|
||||
<field name="name">Quotation Request</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
|
@ -26,7 +35,7 @@
|
|||
<form string="My Board">
|
||||
<hpaned>
|
||||
<child1>
|
||||
<action colspan="4" height="220" name="%(purchase.purchase_rfq)d" string="Draft Purchase Order" width="510"/>
|
||||
<action colspan="4" height="220" name="%(purchase_draft)d" string="Draft Purchase Order" width="510"/>
|
||||
<action colspan="4" height="220" name="%(purchase_waiting)d" string="Purchase Order in Waiting" width="510"/>
|
||||
</child1>
|
||||
<child2>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Purchase Orders">
|
||||
<group>
|
||||
<group colspan="10" col="12">
|
||||
<filter icon="terp-purchase" string="This Year"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Tasks performed in this year"/>
|
||||
|
@ -128,13 +128,13 @@
|
|||
<filter string="Validated by" icon="terp-purchase" context="{'group_by':'validator'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Address Contact Name" icon="terp-purchase" context="{'group_by':'partner_address_id'}"/>
|
||||
<filter string="Dest. Address Contact Name" icon="terp-purchase" context="{'group_by':'dest_address_id'}"/>
|
||||
<filter string="Dest. Contact Name" icon="terp-purchase" context="{'group_by':'dest_address_id'}"/>
|
||||
<filter string="Product" icon="terp-purchase" context="{'group_by':'product_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Supplier" name="partner_id" icon="terp-purchase" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="State" icon="terp-purchase" context="{'group_by':'state'}"/>
|
||||
<filter string="Fiscal Position" icon="terp-purchase" context="{'group_by':'fiscal_position'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<newline/>
|
||||
<filter string="Day" icon="terp-purchase" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-purchase" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-purchase" context="{'group_by':'name'}"/>
|
||||
|
|
Loading…
Reference in New Issue