From 1ff14e9cebf4ec3244374c99ac8a8f58e3e379c3 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Sun, 13 Jun 2010 11:01:34 +0200 Subject: [PATCH] [FIX] purchase report bzr revid: fp@tinyerp.com-20100613090134-4hs79c7709pmhltr --- addons/board_purchase/board_purchase_view.xml | 10 +- addons/purchase/purchase.py | 7 +- addons/purchase/report/purchase_report.py | 102 ++--------- .../purchase/report/purchase_report_view.xml | 166 ++++++------------ 4 files changed, 76 insertions(+), 209 deletions(-) diff --git a/addons/board_purchase/board_purchase_view.xml b/addons/board_purchase/board_purchase_view.xml index 5548b3f2838..8e08ee7134d 100644 --- a/addons/board_purchase/board_purchase_view.xml +++ b/addons/board_purchase/board_purchase_view.xml @@ -2,13 +2,13 @@ - + - + Draft Purchases ir.actions.act_window purchase.order @@ -17,7 +17,7 @@ [('date_order','>',time.strftime('%Y-01-01 00:00:00')),('date_order','<',time.strftime('%Y-12-31 23:59:59')), ('state','=','draft')] - + Quotation Request ir.actions.act_window purchase.order @@ -47,7 +47,7 @@ - + Purchase Dashboard board.board form @@ -55,7 +55,7 @@ menu - - @@ -20,13 +19,13 @@ tree - - - - - + + + + + - + @@ -34,14 +33,14 @@ - - - - + + + + - - - + + + @@ -53,65 +52,56 @@ - + + name="month" + domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]" + help="Tasks performed in this month"/> + string="Quotations" + name="quotes" + domain="[('state','=','draft')]"/> - - - + string="Orders" + name="orders" + domain="[('state','<>','draft'),('state','<>','cancel')]"/> - + - - - - - + + + + + + + - - - - - + - + - + - @@ -127,77 +117,29 @@ purchase.report form tree,graph - - {'search_default_month':1,'search_default_Responsible':1,'group_by_no_leaf':1,'group_by':[]} + {'search_default_month':1,'search_default_group_partner_id':1,'search_default_group_product_id': 1, 'search_default_orders': 1, 'group_by_no_leaf':1,'group_by':[]} - - purchase.order.qty.amount.graph - purchase.order.qty.amount - graph - - - - - - - - + + Purchase Orders by Month + purchase.report + form + graph,tree + {'group_by_no_leaf': 1, 'group_by': ['month']} + [('date','>=',time.strftime('%Y-01-01'))] + - - purchase.order.qty.amount.tree - purchase.order.qty.amount - tree - - - - - - - - + + Purchase Orders by Supplier + purchase.report + form + graph,tree + {'group_by_no_leaf': 1, 'group_by': ['partner_id']} + [('date','>=',time.strftime('%Y-01-01'))] + - - Total Qty and Amount by month - purchase.order.qty.amount - form - graph,tree - - - - purchase.order.by.user.graph - purchase.order.by.user - graph - - - - - - - - - - - purchase.order.by.user.tree - purchase.order.by.user - tree - - - - - - - - - - - Total Orders by User per month - purchase.order.by.user - form - graph,tree -