From ad114aa4bea3516c026f26693ef4f517ff7159eb Mon Sep 17 00:00:00 2001 From: "VRO(OpenERP)" <> Date: Fri, 1 Oct 2010 17:51:35 +0530 Subject: [PATCH] [IMP]: Purchase Dashboard. bzr revid: rch_open_erp-20101001122135-gt5spyszlo18tttp --- addons/account/board_account_view.xml | 2 +- addons/purchase/board_purchase_view.xml | 99 ++++++++++++++++++++++- addons/purchase/report/purchase_report.py | 3 + 3 files changed, 101 insertions(+), 3 deletions(-) diff --git a/addons/account/board_account_view.xml b/addons/account/board_account_view.xml index cc6c6187a83..9823960b0e2 100644 --- a/addons/account/board_account_view.xml +++ b/addons/account/board_account_view.xml @@ -48,8 +48,8 @@ - + diff --git a/addons/purchase/board_purchase_view.xml b/addons/purchase/board_purchase_view.xml index f5b131a69f5..6bbbe0e73e7 100644 --- a/addons/purchase/board_purchase_view.xml +++ b/addons/purchase/board_purchase_view.xml @@ -8,7 +8,7 @@ parent="base.next_id_73" sequence="0"/> - Draft Purchases + Request for Quotations ir.actions.act_window purchase.order form @@ -17,7 +17,7 @@ - Quotation Request + Waiting Approval ir.actions.act_window purchase.order form @@ -26,6 +26,92 @@ + + purchase.order.monthly.categ.tree + purchase.report + tree + + + + + + + + + + purchase.order.monthly.categ.graph + purchase.report + graph + + + + + + + + + + Monthly Purchase by Category + purchase.report + form + graph,tree + + + + + tree + + + + + + graph + + + + + + negotiation.by.supplier.tree + purchase.report + tree + + + + + + + + + negotiation.by.supplier.graph + purchase.report + graph + + + + + + + + + Negotiation by Supplier + purchase.report + form + graph,tree + + + + + tree + + + + + + graph + + + + board.purchase.form board.board @@ -34,13 +120,22 @@
+ + + + + + +
diff --git a/addons/purchase/report/purchase_report.py b/addons/purchase/report/purchase_report.py index 612ea134b4e..f30d65d8f28 100644 --- a/addons/purchase/report/purchase_report.py +++ b/addons/purchase/report/purchase_report.py @@ -65,6 +65,7 @@ class purchase_report(osv.osv): 'nbr': fields.integer('# of Lines', 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), + 'category_id': fields.many2one('product.category', 'Category', readonly=True) } _order = 'name desc,price_total desc' @@ -90,6 +91,7 @@ class purchase_report(osv.osv): s.create_uid as user_id, s.company_id as company_id, l.product_id, + t.categ_id as category_id, l.product_uom as product_uom, s.location_id as location_id, sum(l.product_qty*u.factor) as quantity, @@ -123,6 +125,7 @@ class purchase_report(osv.osv): s.validator, s.dest_address_id, l.product_id, + t.categ_id, s.date_order, to_char(s.date_order, 'YYYY'), to_char(s.date_order, 'MM'),