[IMP] analysis report

bzr revid: fp@tinyerp.com-20111111150443-b64llh92b4xq2ych
This commit is contained in:
Fabien Pinckaers 2011-11-11 16:04:43 +01:00
commit 2583db204a
3 changed files with 36 additions and 16 deletions

View File

@ -87,7 +87,7 @@
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')),('create_date','>=',time.strftime('%%Y-01-01'))]"
help="Leads/Opportunities created in current year"/>
<separator orientation="vertical" />
<filter string=" Month " icon="terp-go-month" name="this_month"
<filter string="Month" icon="terp-go-month" name="this_month"
domain="[('create_date','&lt;=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('create_date','&gt;=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"
help="Leads/Opportunities created in current month"/>
<filter icon="terp-go-month" string=" Month-1 "

View File

@ -154,6 +154,9 @@ class report_stock_inventory(osv.osv):
_auto = False
_columns = {
'date': fields.datetime('Date', readonly=True),
'year': fields.char('Year', size=4, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September')]),
'partner_id':fields.many2one('res.partner.address', 'Partner', readonly=True),
'product_id':fields.many2one('product.product', 'Product', readonly=True),
'product_categ_id':fields.many2one('product.category', 'Product Category', readonly=True),

View File

@ -37,7 +37,6 @@
</tree>
</field>
</record>
<record id="view_stock_graph" model="ir.ui.view">
<field name="name">report.stock.move.graph</field>
<field name="model">report.stock.move</field>
@ -60,7 +59,6 @@
</graph>
</field>
</record>
<record id="view_stock_search" model="ir.ui.view">
<field name="name">report.stock.move.search</field>
<field name="model">report.stock.move</field>
@ -69,17 +67,19 @@
<search string="Moves Analysis">
<group>
<filter icon="terp-go-year" string="Year"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;=',time.strftime('%%Y-01-01'))]"
help="Current year"/>
<filter icon="terp-go-month"
string="Month-1"
name="month-1"
domain="[('date','&lt;=', (datetime.date.today() - relativedelta(day=31, months=1)).strftime('%%Y-%%m-%%d')),('date','&gt;=',(datetime.date.today() - relativedelta(day=1,months=1)).strftime('%%Y-%%m-%%d'))]"
help="Last month"/>
name="year"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;=',time.strftime('%%Y-01-01'))]"
help="Current year"/>
<separator orientation="vertical"/>
<filter icon="terp-go-month" string="Month"
name="month"
domain="[('date','&lt;=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('date','&gt;=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"
help="Current month"/>
name="month"
domain="[('date','&lt;=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('date','&gt;=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"
help="Current month"/>
<filter icon="terp-go-month"
string="Month-1"
name="month-1"
domain="[('date','&lt;=', (datetime.date.today() - relativedelta(day=31, months=1)).strftime('%%Y-%%m-%%d')),('date','&gt;=',(datetime.date.today() - relativedelta(day=1,months=1)).strftime('%%Y-%%m-%%d'))]"
help="Last month"/>
<separator orientation="vertical"/>
<filter string="Done"
name="done"
@ -90,7 +90,6 @@
icon="terp-gtk-go-back-rtl"
domain="[('state','in',('assigned','waiting','confirmed'))]"
help = "Future Stock-Moves"/>
<separator orientation="vertical"/>
<filter icon="terp-go-home" name="in" string="Incoming" domain="[('type','=','in')]"/>
<filter icon="terp-go-home" name="internal" string="Internal" domain="[('type','=','internal')]"/>
@ -142,7 +141,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="search_view_id" ref="view_stock_search"/>
<field name="context">{'full':'1','contact_display': 'partner','search_default_done':1, 'search_default_month':1, 'search_default_group_type':1, 'group_by': [], 'group_by_no_leaf':1,}</field>
<field name="context">{'full':'1','contact_display': 'partner','search_default_done':1,'search_default_year':1, 'search_default_month':1, 'search_default_group_type':1, 'group_by': [], 'group_by_no_leaf':1,}</field>
<field name="help">Moves Analysis allows you to easily check and analyse your company stock moves. Use this report when you want to analyse the different routes taken by your products and inventory management performance.</field>
</record>
<menuitem action="action_stock_move_report" id="menu_action_stock_move_report" parent="next_id_61" sequence="3"/>
@ -155,6 +154,8 @@
<field name="arch" type="xml">
<tree string="Inventory Analysis">
<field name="date" invisible="1"/>
<field name="year" invisible="1" />
<field name="month" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="location_type" invisible="1"/>
<field name="location_id" invisible="1"/>
@ -188,6 +189,21 @@
<field name="arch" type="xml">
<search string="Inventory Analysis">
<group>
<filter icon="terp-go-year" string="Year"
name="year"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;=',time.strftime('%%Y-01-01'))]"
help="Current year"/>
<separator orientation="vertical"/>
<filter icon="terp-go-month" string="Month"
name="month"
domain="[('date','&lt;=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('date','&gt;=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"
help="Current month"/>
<filter icon="terp-go-month"
string="Month-1"
name="month-1"
domain="[('date','&lt;=', (datetime.date.today() - relativedelta(day=31, months=1)).strftime('%%Y-%%m-%%d')),('date','&gt;=',(datetime.date.today() - relativedelta(day=1,months=1)).strftime('%%Y-%%m-%%d'))]"
help="Last month"/>
<separator orientation="vertical"/>
<filter string="Real"
name="real"
icon="terp-check"
@ -240,7 +256,8 @@
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="search_view_id" eval="False"/>
<field name="context">{'contact_display': 'partner', 'search_default_real':1, 'search_default_location_type_internal':1,'search_default_group_product':1,'group_by':[], 'group_by_no_leaf':1}</field>
<field name="context">{'contact_display': 'partner', 'search_default_real':1,
'search_default_year':1,'search_default_month':1, 'search_default_location_type_internal':1,'search_default_group_product':1,'group_by':[], 'group_by_no_leaf':1}</field>
<field name="help">Inventory Analysis allows you to easily check and analyse your company stock levels. Sort and group by selection criteria in order to better analyse and manage your company activities.</field>
</record>
<menuitem action="action_stock_inventory_report"