diff --git a/addons/account/report/account_aged_partner_balance.py b/addons/account/report/account_aged_partner_balance.py
index 2b60de5b505..cf35fcebe72 100644
--- a/addons/account/report/account_aged_partner_balance.py
+++ b/addons/account/report/account_aged_partner_balance.py
@@ -132,7 +132,7 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
history = []
for i in range(5):
args_list = (tuple(self.ACCOUNT_TYPE), tuple(partner_ids) ,self.date_from,)
- dates_query = '(COALESCE(date_maturity,date)'
+ dates_query = "(COALESCE(date_maturity,date)"
if form[str(i)]['start'] and form[str(i)]['stop']:
dates_query += ' BETWEEN %s AND %s)'
args_list += (form[str(i)]['start'], form[str(i)]['stop'])
@@ -254,17 +254,30 @@ class aged_trial_report(rml_parse.rml_parse, common_report_header):
for i in t:
future_past['No Partner Defined'] = i[0]
history = []
+
for i in range(5):
+ args_list = (tuple(self.ACCOUNT_TYPE), self.date_from)
+ dates_query = "(COALESCE(date_maturity,date)"
+ if form[str(i)]['start'] and form[str(i)]['stop']:
+ dates_query += ' BETWEEN %s AND %s)'
+ args_list += (form[str(i)]['start'], form[str(i)]['stop'])
+ elif form[str(i)]['start']:
+ dates_query += ' > %s)'
+ args_list += (form[str(i)]['start'],)
+ else:
+ dates_query += ' < %s)'
+ args_list += (form[str(i)]['stop'],)
+
self.cr.execute('SELECT SUM(debit-credit)\
FROM account_move_line AS l, account_account\
WHERE (l.account_id = account_account.id)\
AND (l.partner_id IS NULL)\
AND (account_account.type IN %s)\
- AND (COALESCE(date_maturity,date) BETWEEN %s AND %s)\
AND ((reconcile_id IS NULL)\
OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
AND '+ self.query + '\
- AND account_account.active ' , (tuple(self.ACCOUNT_TYPE), form[str(i)]['start'], form[str(i)]['stop'], self.date_from,))
+ AND '+ dates_query + '\
+ AND account_account.active ' , args_list)
t = self.cr.fetchall()
d = {}
for i in t:
diff --git a/addons/account/wizard/account_report_aged_partner_balance.py b/addons/account/wizard/account_report_aged_partner_balance.py
index fb0e404401a..b8b2a013d78 100644
--- a/addons/account/wizard/account_report_aged_partner_balance.py
+++ b/addons/account/wizard/account_report_aged_partner_balance.py
@@ -77,7 +77,7 @@ class account_aged_trial_balance(osv.osv_memory):
res[str(i)] = {
'name': (i!=0 and (str((5-(i+1)) * period_length) + '-' + str((5-i) * period_length)) or ('+'+str(4 * period_length))),
'stop': start.strftime('%Y-%m-%d'),
- 'start': (i!=0 and stop.strftime('%Y-%m-%d') or None),
+ 'start': (i!=0 and stop.strftime('%Y-%m-%d') or False),
}
start = stop - RelativeDateTime(days=1)
else:
@@ -86,7 +86,7 @@ class account_aged_trial_balance(osv.osv_memory):
res[str(5-(i+1))] = {
'name' : (i!=4 and str((i) * period_length)+'-' + str((i+1) * period_length) or ('+'+str(4 * period_length))),
'start': start.strftime('%Y-%m-%d'),
- 'stop': (i!=4 and stop.strftime('%Y-%m-%d') or None),
+ 'stop': (i!=4 and stop.strftime('%Y-%m-%d') or False),
}
start = stop + RelativeDateTime(days=1)
data['form'].update(res)
diff --git a/addons/account/wizard/account_report_balance_sheet.py b/addons/account/wizard/account_report_balance_sheet.py
index ebe3b4c8ba8..9a53314c7a2 100644
--- a/addons/account/wizard/account_report_balance_sheet.py
+++ b/addons/account/wizard/account_report_balance_sheet.py
@@ -47,10 +47,9 @@ class account_bs_report(osv.osv_memory):
mod_obj = self.pool.get('ir.model.data')
res = super(account_bs_report, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
doc = etree.XML(res['arch'])
- nodes = doc.xpath("//field[@name='journal_ids']")
+ nodes = doc.xpath("//page[@name='journal_ids']")
for node in nodes:
- node.set('readonly', '1')
- node.set('required', '0')
+ node.set('invisible', '1')
res['arch'] = etree.tostring(doc)
return res
@@ -78,4 +77,4 @@ class account_bs_report(osv.osv_memory):
account_bs_report()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account/wizard/account_report_common_view.xml b/addons/account/wizard/account_report_common_view.xml
index aa140c7f8fc..ec3aa6b227b 100644
--- a/addons/account/wizard/account_report_common_view.xml
+++ b/addons/account/wizard/account_report_common_view.xml
@@ -8,35 +8,27 @@
form
diff --git a/addons/email_template/__init__.py b/addons/email_template/__init__.py
index a21bd4bec06..dd87232679d 100644
--- a/addons/email_template/__init__.py
+++ b/addons/email_template/__init__.py
@@ -3,7 +3,7 @@
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2009 Sharoon Thomas
-# Copyright (C) 2004-2010 OpenERP SA ()
+# Copyright (C) 2010-2010 OpenERP SA ()
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/addons/email_template/__openerp__.py b/addons/email_template/__openerp__.py
index 3654f22047c..6aa4899feb6 100644
--- a/addons/email_template/__openerp__.py
+++ b/addons/email_template/__openerp__.py
@@ -3,7 +3,7 @@
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2009 Sharoon Thomas
-# Copyright (C) 2004-2010 OpenERP SA ()
+# Copyright (C) 2010-2010 OpenERP SA ()
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py
index 85225505237..f87c4bf750e 100644
--- a/addons/email_template/email_template.py
+++ b/addons/email_template/email_template.py
@@ -3,7 +3,7 @@
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2009 Sharoon Thomas
-# Copyright (C) 2004-2010 OpenERP SA ()
+# Copyright (C) 2010-2010 OpenERP SA ()
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/addons/email_template/wizard/__init__.py b/addons/email_template/wizard/__init__.py
old mode 100755
new mode 100644
index eb7cd23f704..1641152490e
--- a/addons/email_template/wizard/__init__.py
+++ b/addons/email_template/wizard/__init__.py
@@ -3,7 +3,7 @@
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2009 Sharoon Thomas
-# Copyright (C) 2004-2010 OpenERP SA ()
+# Copyright (C) 2010-2010 OpenERP SA ()
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/addons/email_template/wizard/email_template_send_wizard.py b/addons/email_template/wizard/email_template_send_wizard.py
old mode 100755
new mode 100644
index 73cf5af6ede..3588ca20ded
--- a/addons/email_template/wizard/email_template_send_wizard.py
+++ b/addons/email_template/wizard/email_template_send_wizard.py
@@ -3,7 +3,7 @@
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2009 Sharoon Thomas
-# Copyright (C) 2004-2010 OpenERP SA ()
+# Copyright (C) 2010-2010 OpenERP SA ()
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/addons/email_template/wizard/email_template_send_wizard_view.xml b/addons/email_template/wizard/email_template_send_wizard_view.xml
old mode 100755
new mode 100644