From 6dc12c2d164fddd08cd2e8375ec210f3577c3732 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Wed, 15 Sep 2010 14:32:13 +0200 Subject: [PATCH 1/4] [FIX] changed the copyright as requested by sharoon bzr revid: fp@tinyerp.com-20100915123213-z4gmvddsu5cmf393 --- addons/email_template/__init__.py | 2 +- addons/email_template/__openerp__.py | 2 +- addons/email_template/email_template.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 From 424541923f566c8fe92765779895b3d564ccd44f Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Wed, 15 Sep 2010 14:33:48 +0200 Subject: [PATCH 2/4] [IMP] fixed sharroon copyright bzr revid: fp@tinyerp.com-20100915123348-dsrpxry3eid2zxce --- addons/email_template/wizard/__init__.py | 2 +- addons/email_template/wizard/email_template_send_wizard.py | 2 +- .../email_template/wizard/email_template_send_wizard_view.xml | 0 3 files changed, 2 insertions(+), 2 deletions(-) mode change 100755 => 100644 addons/email_template/wizard/__init__.py mode change 100755 => 100644 addons/email_template/wizard/email_template_send_wizard.py mode change 100755 => 100644 addons/email_template/wizard/email_template_send_wizard_view.xml 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 From baeea2bcb98fbc7cf9cfeca5f96d56f52a39feda Mon Sep 17 00:00:00 2001 From: "qdp-launchpad@tinyerp.com" <> Date: Wed, 15 Sep 2010 15:17:50 +0200 Subject: [PATCH 3/4] [FIX] account: aged partner balance fixed (complicany with xml-rpc + no partner defined lines bzr revid: qdp-launchpad@tinyerp.com-20100915131750-ids1w11dpknrbbmr --- .../report/account_aged_partner_balance.py | 19 ++++++++++++++++--- .../account_report_aged_partner_balance.py | 4 ++-- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/addons/account/report/account_aged_partner_balance.py b/addons/account/report/account_aged_partner_balance.py index 119c1edef1a..77c64176330 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']) @@ -255,17 +255,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) From cc8b6d1f5ccb0f846123187418124e1629ab9a39 Mon Sep 17 00:00:00 2001 From: "qdp-launchpad@tinyerp.com" <> Date: Wed, 15 Sep 2010 15:58:06 +0200 Subject: [PATCH 4/4] [IMP] account: usability change in reports wizards bzr revid: qdp-launchpad@tinyerp.com-20100915135806-qvj70q9xmuckqjf7 --- .../wizard/account_report_balance_sheet.py | 7 ++--- .../wizard/account_report_common_view.xml | 30 +++++++------------ 2 files changed, 14 insertions(+), 23 deletions(-) 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
- - - - + + + + + + + + + + + - - - - - - - - - - - - - -