[IMP] improves the Reception Analysis reporting view, removes old Day, Month, Year field from the postgres view and updates the dashboard graph view (addon stock)
bzr revid: ged@openerp.com-20140129135519-uo98mu24qy2h29pq
This commit is contained in:
parent
90f2184e93
commit
23f4aca0a8
|
@ -7,9 +7,9 @@
|
|||
<field name="model">report.stock.move</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Moves Analysis" type="bar" stacked="True">
|
||||
<field name="day" type="row"/>
|
||||
<field name="product_qty" type="measure"/>
|
||||
<field name="date" interval="day" type="row"/>
|
||||
<field name="categ_id" type="row"/>
|
||||
<field name="product_qty" type="measure"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -19,7 +19,7 @@
|
|||
<field name="res_model">report.stock.move</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
<field name="domain">[('type','=','in'),('day','<=', time.strftime('%Y-%m-%d')),('day','>',(context_today()-datetime.timedelta(days=15)).strftime('%Y-%m-%d'))]</field>
|
||||
<field name="domain">[('type','=','in'),('date','<=', time.strftime('%Y-%m-%d')),('date','>',(context_today()-datetime.timedelta(days=15)).strftime('%Y-%m-%d'))]</field>
|
||||
<field name="view_id" ref="view_stock_graph_board"></field>
|
||||
<field name="context">{'search_default_in':1}</field>
|
||||
</record>
|
||||
|
@ -28,7 +28,7 @@
|
|||
<field name="res_model">report.stock.move</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
<field name="domain">[('type','=','out'),('day','<=', time.strftime('%Y-%m-%d')),('day','>',(context_today()-datetime.timedelta(days=15)).strftime('%Y-%m-%d'))]</field>
|
||||
<field name="domain">[('type','=','out'),('date','<=', time.strftime('%Y-%m-%d')),('date','>',(context_today()-datetime.timedelta(days=15)).strftime('%Y-%m-%d'))]</field>
|
||||
<field name="view_id" ref="view_stock_graph_board"></field>
|
||||
<field name="context">{'search_default_out':1}</field>
|
||||
</record>
|
||||
|
|
|
@ -30,11 +30,6 @@ class report_stock_move(osv.osv):
|
|||
_auto = False
|
||||
_columns = {
|
||||
'date': fields.date('Date', readonly=True),
|
||||
'year': fields.char('Year', size=4, readonly=True),
|
||||
'day': fields.char('Day', size=128, 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),
|
||||
'partner_id':fields.many2one('res.partner', 'Partner', readonly=True),
|
||||
'product_id':fields.many2one('product.product', 'Product', readonly=True),
|
||||
'company_id':fields.many2one('res.company', 'Company', readonly=True),
|
||||
|
@ -63,9 +58,6 @@ class report_stock_move(osv.osv):
|
|||
SELECT
|
||||
min(sm.id) as id,
|
||||
date_trunc('day', sm.date) as date,
|
||||
to_char(date_trunc('day',sm.date), 'YYYY') as year,
|
||||
to_char(date_trunc('day',sm.date), 'MM') as month,
|
||||
to_char(date_trunc('day',sm.date), 'YYYY-MM-DD') as day,
|
||||
avg(date(sm.date)-date(sm.create_date)) as day_diff,
|
||||
avg(date(sm.date_expected)-date(sm.create_date)) as day_diff1,
|
||||
avg(date(sm.date)-date(sm.date_expected)) as day_diff2,
|
||||
|
@ -115,8 +107,7 @@ class report_stock_move(osv.osv):
|
|||
coalesce(sp.type, 'other'), date_trunc('day', sm.date), sm.partner_id,
|
||||
sm.state, sm.product_uom, sm.date_expected,
|
||||
sm.product_id, pt.standard_price, sm.picking_id,
|
||||
sm.company_id, sm.location_id, sm.location_dest_id, pu.factor, pt.categ_id, sp.stock_journal_id,
|
||||
year, month, day
|
||||
sm.company_id, sm.location_id, sm.location_dest_id, pu.factor, pt.categ_id, sp.stock_journal_id
|
||||
)
|
||||
""")
|
||||
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
<graph string="Moves Analysis" type="pivot">
|
||||
<field name="product_id" type="row"/>
|
||||
<field name="product_qty" type="measure"/>
|
||||
<field name="product_qty_in" type="measure"/>
|
||||
<field name="product_qty_out" type="measure"/>
|
||||
<field name="value" type="measure"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -52,9 +55,9 @@
|
|||
<filter string="Status" name="group_state" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
|
||||
<filter string="Stock journal" name="group_stock_journal" icon="terp-folder-orange" context="{'group_by':'stock_journal'}"/>
|
||||
<filter string="Company" name="group_state" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}" help="Day Planned"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'date'}" help="Month Planned"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}" help="Year Planned"/>
|
||||
<filter string="Date Planned (day)" icon="terp-go-day" context="{'group_by':'date:day'}" help="Day Planned"/>
|
||||
<filter string="Date Planned (month)" icon="terp-go-month" context="{'group_by':'date:month'}" help="Month Planned"/>
|
||||
<filter string="Date Planned (year)" icon="terp-go-year" context="{'group_by':'date:year'}" help="Year Planned"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
@ -66,6 +69,7 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph</field>
|
||||
<field name="search_view_id" ref="view_stock_search"/>
|
||||
<field name="view_id" ref="view_stock_graph"></field>
|
||||
<field name="context">{'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>
|
||||
|
@ -78,6 +82,7 @@
|
|||
<graph string="Inventory Analysis" type="pivot">
|
||||
<field name="product_id" type="row"/>
|
||||
<field name="product_qty" type="measure"/>
|
||||
<field name="value" type="measure"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
|
Loading…
Reference in New Issue