From 0f71b214ab72660aae0507908e46d57d313bf823 Mon Sep 17 00:00:00 2001 From: "psi (Open ERP)" Date: Thu, 29 Apr 2010 11:39:43 +0530 Subject: [PATCH] [Fix] account: Reports with m2m field client segmentation fault solved bzr revid: psi@tinyerp.co.in-20100429060943-6vjv59jmrvd619z4 --- addons/account/report/account_balance.py | 1 - addons/account/wizard/account_automatic_reconcile.py | 3 ++- addons/account/wizard/account_balance_report.py | 2 ++ addons/account/wizard/account_central_journal.py | 1 + .../wizard/account_compare_account_balance_report.py | 8 ++++++++ addons/account/wizard/account_general_journal.py | 5 ++--- addons/account/wizard/account_general_ledger_report.py | 4 ++++ addons/account/wizard/account_partner_balance_report.py | 2 ++ addons/account/wizard/account_print_journal.py | 3 ++- addons/account/wizard/account_third_party_ledger.py | 3 +++ addons/account/wizard/account_use_model_view.xml | 5 ++--- addons/account/wizard/account_vat.py | 1 + 12 files changed, 29 insertions(+), 9 deletions(-) diff --git a/addons/account/report/account_balance.py b/addons/account/report/account_balance.py index 558ebc68380..e4731e2c994 100644 --- a/addons/account/report/account_balance.py +++ b/addons/account/report/account_balance.py @@ -29,7 +29,6 @@ from report import report_sxw class account_balance(report_sxw.rml_parse): _name = 'report.account.account.balance' def __init__(self, cr, uid, name, context): - print " KKKKKKKKKKKKKKKKKKKKKKKK" super(account_balance, self).__init__(cr, uid, name, context=context) self.sum_debit = 0.00 self.sum_credit = 0.00 diff --git a/addons/account/wizard/account_automatic_reconcile.py b/addons/account/wizard/account_automatic_reconcile.py index 3f9ec556522..1a4a53c4c57 100644 --- a/addons/account/wizard/account_automatic_reconcile.py +++ b/addons/account/wizard/account_automatic_reconcile.py @@ -235,7 +235,8 @@ class account_automatic_reconcile(osv.osv_memory): 'views': [(resource_id,'form')], 'type': 'ir.actions.act_window', 'target': 'new', - 'context': context + 'context': context, + 'nodestroy':True, } account_automatic_reconcile() diff --git a/addons/account/wizard/account_balance_report.py b/addons/account/wizard/account_balance_report.py index 98fd8f799ee..b131ff3123a 100644 --- a/addons/account/wizard/account_balance_report.py +++ b/addons/account/wizard/account_balance_report.py @@ -109,6 +109,7 @@ class account_balance_report(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance', 'datas': data, + 'nodestroy':True, } def _check_date(self, cr, uid, data, context=None): @@ -127,6 +128,7 @@ class account_balance_report(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance', 'datas': data, + 'nodestroy':True, } else: raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year')) diff --git a/addons/account/wizard/account_central_journal.py b/addons/account/wizard/account_central_journal.py index 08fe881c81a..49c8a43a04d 100644 --- a/addons/account/wizard/account_central_journal.py +++ b/addons/account/wizard/account_central_journal.py @@ -53,6 +53,7 @@ class account_central_journal(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.central.journal', 'datas': datas, + 'nodestroy':True, } account_central_journal() diff --git a/addons/account/wizard/account_compare_account_balance_report.py b/addons/account/wizard/account_compare_account_balance_report.py index fd1d4d55ada..9e8d7fded2e 100755 --- a/addons/account/wizard/account_compare_account_balance_report.py +++ b/addons/account/wizard/account_compare_account_balance_report.py @@ -74,12 +74,14 @@ class account_compare_account_balance_report(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance.landscape', 'datas': data, + 'nodestroy':True, } else: return { 'type': 'ir.actions.report.xml', 'report_name': 'account.balance.account.balance', 'datas': data, + 'nodestroy':True, } if data['form']['format_perc']==1: if len(data['form']['fiscalyear'])<=2: @@ -88,12 +90,14 @@ class account_compare_account_balance_report(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance.landscape', 'datas': data, + 'nodestroy':True, } else: return { 'type': 'ir.actions.report.xml', 'report_name': 'account.balance.account.balance', 'datas': data, + 'nodestroy':True, } else: if len(data['form']['fiscalyear'])==3: @@ -102,6 +106,7 @@ class account_compare_account_balance_report(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance.landscape', 'datas': data, + 'nodestroy':True, } else: raise osv.except_osv(_('Warning !'), _('You might have done following mistakes. Please correct them and try again. \n 1. You have selected more than 3 years in any case. \n 2. You have not selected Percentage option, but you have selected more than 2 years. \n You can select maximum 3 years. Please check again. \n 3. You have selected Percentage option with more than 2 years, but you have not selected landscape format. You have to select Landscape option. Please Check it.')) @@ -114,6 +119,7 @@ class account_compare_account_balance_report(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance.landscape', 'datas': data, + 'nodestroy':True, } else: raise osv.except_osv(_('Warning !'), _('You might have done following mistakes. Please correct them and try again. \n 1. You have selected more than 3 years in any case. \n 2. You have not selected Percentage option, but you have selected more than 2 years. \n You can select maximum 3 years. Please check again. \n 3. You have selected Percentage option with more than 2 years, but you have not selected landscape format. You have to select Landscape option. Please Check it.')) @@ -123,12 +129,14 @@ class account_compare_account_balance_report(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance.landscape', 'datas': data, + 'nodestroy':True, } else: return { 'type': 'ir.actions.report.xml', 'report_name': 'account.balance.account.balance', 'datas': data, + 'nodestroy':True, } account_compare_account_balance_report() diff --git a/addons/account/wizard/account_general_journal.py b/addons/account/wizard/account_general_journal.py index 56ad7375acf..07a08aba3e2 100644 --- a/addons/account/wizard/account_general_journal.py +++ b/addons/account/wizard/account_general_journal.py @@ -18,7 +18,6 @@ # along with this program. If not, see . # ############################################################################## - from osv import osv, fields from tools.translate import _ @@ -53,8 +52,8 @@ class account_general_journal(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.general.journal', 'datas': datas, + 'nodestroy':True, } account_general_journal() - -#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: +#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/account/wizard/account_general_ledger_report.py b/addons/account/wizard/account_general_ledger_report.py index b9d30d116a1..9809f4aad89 100644 --- a/addons/account/wizard/account_general_ledger_report.py +++ b/addons/account/wizard/account_general_ledger_report.py @@ -107,12 +107,14 @@ class account_general_ledger_report(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.general.ledger_landscape', 'datas': data, + 'nodestroy':True, } else: return { 'type': 'ir.actions.report.xml', 'report_name': 'account.general.ledger', 'datas': data, + 'nodestroy':True, } else: raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year')) @@ -139,12 +141,14 @@ class account_general_ledger_report(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.general.ledger_landscape', 'datas': data, + 'nodestroy':True, } else: return { 'type': 'ir.actions.report.xml', 'report_name': 'account.general.ledger', 'datas': data, + 'nodestroy':True, } account_general_ledger_report() diff --git a/addons/account/wizard/account_partner_balance_report.py b/addons/account/wizard/account_partner_balance_report.py index 3aa5b3c8253..476963bf68b 100644 --- a/addons/account/wizard/account_partner_balance_report.py +++ b/addons/account/wizard/account_partner_balance_report.py @@ -84,6 +84,7 @@ class account_partner_balance(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.partner.balance', 'datas': data, + 'nodestroy':True, } def _check_date(self, cr, uid, data, context): @@ -99,6 +100,7 @@ class account_partner_balance(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.partner.balance', 'datas': data, + 'nodestroy':True, } else: raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year')) diff --git a/addons/account/wizard/account_print_journal.py b/addons/account/wizard/account_print_journal.py index 89de9a643f9..a7b81db851d 100644 --- a/addons/account/wizard/account_print_journal.py +++ b/addons/account/wizard/account_print_journal.py @@ -59,8 +59,9 @@ class account_print_journal(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.journal.period.print', 'datas': datas, + 'nodestroy':True, } account_print_journal() -#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: +#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/account/wizard/account_third_party_ledger.py b/addons/account/wizard/account_third_party_ledger.py index 5ec2dbdb94f..7a6514e17c2 100755 --- a/addons/account/wizard/account_third_party_ledger.py +++ b/addons/account/wizard/account_third_party_ledger.py @@ -97,12 +97,14 @@ class account_partner_ledger(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.third_party_ledger', 'datas': data, + 'nodestroy':True, } else: return { 'type': 'ir.actions.report.xml', 'report_name': 'account.third_party_ledger_other', 'datas': data, + 'nodestroy':True, } def _check_date(self, cr, uid, data, context=None): @@ -120,6 +122,7 @@ class account_partner_ledger(osv.osv_memory): 'type': 'ir.actions.report.xml', 'report_name': 'account.third_party_ledger', 'datas': data, + 'nodestroy':True, } else: raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year')) diff --git a/addons/account/wizard/account_use_model_view.xml b/addons/account/wizard/account_use_model_view.xml index 877a83dbb00..fec632c2e59 100644 --- a/addons/account/wizard/account_use_model_view.xml +++ b/addons/account/wizard/account_use_model_view.xml @@ -12,7 +12,6 @@ -