From 0042fdf5c65a1c3e61cb2932bb4044174cebe696 Mon Sep 17 00:00:00 2001 From: "rch(OpenERP)" <> Date: Fri, 2 Jul 2010 17:56:30 +0530 Subject: [PATCH] [IMP]:purchase:improved purchase dashboard. bzr revid: apa@apa-20100702122630-vh0jz3sugn396fe8 --- addons/purchase/board_purchase_view.xml | 9 +- addons/purchase/report/purchase_report.py | 18 ++-- .../purchase/report/purchase_report_view.xml | 92 +++++++++++++++++++ 3 files changed, 105 insertions(+), 14 deletions(-) diff --git a/addons/purchase/board_purchase_view.xml b/addons/purchase/board_purchase_view.xml index b1822519cf0..10e35e0e04c 100644 --- a/addons/purchase/board_purchase_view.xml +++ b/addons/purchase/board_purchase_view.xml @@ -35,12 +35,13 @@
- - + + - - + + +
diff --git a/addons/purchase/report/purchase_report.py b/addons/purchase/report/purchase_report.py index d5688e5bd22..e85561f28b6 100644 --- a/addons/purchase/report/purchase_report.py +++ b/addons/purchase/report/purchase_report.py @@ -34,16 +34,14 @@ class purchase_report(osv.osv): 'date': fields.date('Order Date', readonly=True), 'name': fields.char('Year',size=64,required=False, readonly=True), 'day': fields.char('Day', size=128, readonly=True), - 'state': fields.selection([ - ('draft','Quotation'), - ('waiting_date','Waiting Schedule'), - ('manual','Manual in progress'), - ('progress','In progress'), - ('shipping_except','Shipping Exception'), - ('invoice_except','Invoice Exception'), - ('done','Done'), - ('cancel','Cancel') - ], 'Order State', readonly=True), + 'state': fields.selection([('draft', 'Request for Quotation'), + ('wait', 'Waiting'), + ('confirmed', 'Waiting Supplier Ack'), + ('approved', 'Approved'), + ('except_picking', 'Shipping Exception'), + ('except_invoice', 'Invoice Exception'), + ('done', 'Done'), + ('cancel', 'Cancelled')],'Order State', readonly=True), 'product_id':fields.many2one('product.product', 'Product', readonly=True), 'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', readonly=True), 'location_id': fields.many2one('stock.location', 'Destination', readonly=True), diff --git a/addons/purchase/report/purchase_report_view.xml b/addons/purchase/report/purchase_report_view.xml index 6b27a0ec6df..82478da3156 100644 --- a/addons/purchase/report/purchase_report_view.xml +++ b/addons/purchase/report/purchase_report_view.xml @@ -176,6 +176,98 @@ + + purchase.by.supplier.graph + purchase.report + tree + + + + + + + + + Purchase by supplier + purchase.report + form + tree + [('state','=','done'),('date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%Y-%m-%d'))] + {'group_by_no_leaf':1,'group_by':['partner_id']} + + + + total.price.by.product.by.state.graph + purchase.report + tree + + + + + + + + + + Total price by product by state + purchase.report + form + tree,graph + {'group_by_no_leaf':1,'group_by':['product_id','state']} + + + + + qty.per.product.graph + purchase.report + tree + + + + + + + + + Qty. per product + purchase.report + form + tree + [('state','=','done')] + {'group_by_no_leaf':1,'group_by':['product_id']} + + + + + qty.per.product.tree + purchase.report + tree + + + + + + + + + + Purchase order per month + purchase.report + form + tree + [('date','>',time.strftime('%Y-01-01 00:00:00')),('date','<',time.strftime('%Y-12-31 23:59:59')),('state','=','done')] + {'group_by_no_leaf':1,'group_by':['month','product_id']} + + + + + Current purchases + purchase.order + form + tree,form + [('state','in',('draft','confirmed'))] + +