From 7197572bf1eac5dc4f3f8244ba4c75b99086f85d Mon Sep 17 00:00:00 2001
From: nel <>
Date: Fri, 4 Jul 2008 06:05:01 +0000
Subject: [PATCH] Clean file + return blank field when no data
bzr revid: nel-9e175ee70865726e15a9353c86117472cce11c76
---
addons/account/report/account_balance.py | 4 ++--
addons/account/report/account_balance.rml | 4 ++--
addons/sale/report/order.rml | 1 -
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/addons/account/report/account_balance.py b/addons/account/report/account_balance.py
index 7312c6fbc49..91d99cb5800 100644
--- a/addons/account/report/account_balance.py
+++ b/addons/account/report/account_balance.py
@@ -49,7 +49,7 @@ class account_balance(report_sxw.rml_parse):
fisc_id = form['fiscalyear']
self.cr.execute("select name from account_fiscalyear where id = %d" %(int(fisc_id)))
res=self.cr.fetchone()
- return res and res[0]
+ return res and res[0] or ''
def get_periods(self, form, ids={}, done=None, level=1):
period_ids = ",".join([str(x) for x in form['periods'][0][2] if x])
@@ -58,7 +58,7 @@ class account_balance(report_sxw.rml_parse):
result=''
for r in res:
result+=r[0]+","
- return str(result[:-1])
+ return str(result and result[:-1]) or ''
def lines(self, form, ids={}, done=None, level=1):
if not ids:
diff --git a/addons/account/report/account_balance.rml b/addons/account/report/account_balance.rml
index 4bf3c30884b..22396869554 100644
--- a/addons/account/report/account_balance.rml
+++ b/addons/account/report/account_balance.rml
@@ -75,7 +75,7 @@
-
+
@@ -104,7 +104,7 @@
-
+
diff --git a/addons/sale/report/order.rml b/addons/sale/report/order.rml
index 0d5868a44ad..c0cced3ecc7 100644
--- a/addons/sale/report/order.rml
+++ b/addons/sale/report/order.rml
@@ -121,7 +121,6 @@
-
Your Reference
|