diff --git a/addons/account/report/account_balance.py b/addons/account/report/account_balance.py
index 379e01cdf6f..64db67efea5 100644
--- a/addons/account/report/account_balance.py
+++ b/addons/account/report/account_balance.py
@@ -57,7 +57,7 @@ class account_balance(report_sxw.rml_parse):
def get_periods(self, form):
result=''
- if form.has_key('periods'):
+ if form.has_key('periods') and form['periods'][0][2]:
period_ids = ",".join([str(x) for x in form['periods'][0][2] if x])
self.cr.execute("select name from account_period where id in (%s)" % (period_ids))
res=self.cr.fetchall()
diff --git a/addons/report_sale/report_sale_view.xml b/addons/report_sale/report_sale_view.xml
index eba8fe71223..1cfb0509ae1 100644
--- a/addons/report_sale/report_sale_view.xml
+++ b/addons/report_sale/report_sale_view.xml
@@ -149,9 +149,28 @@
[('date_order','>=',time.strftime('%Y-%m-01')),('state','<>','draft'),('state','<>','cancel')]
+
+
+ sale.order.dashboard.graph
+ sale.order
+ graph
+
+
+
+
+
+
+
-
-
-
+
+ Sales by State
+ sale.order
+ form
+ graph,tree
+
+ [('state','<>','done')]
+
+
+