[Fix] account: Reports with m2m field client segmentation fault solved

bzr revid: psi@tinyerp.co.in-20100429060943-6vjv59jmrvd619z4
This commit is contained in:
psi (Open ERP) 2010-04-29 11:39:43 +05:30
parent d6208f290e
commit 0f71b214ab
12 changed files with 29 additions and 9 deletions

View File

@ -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

View File

@ -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()

View File

@ -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'))

View File

@ -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()

View File

@ -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()

View File

@ -18,7 +18,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
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:

View File

@ -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()

View File

@ -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'))

View File

@ -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:

View File

@ -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'))

View File

@ -12,7 +12,6 @@
<field name="model"/>
</group>
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-execute" string="Create Entries" name="create_entries" type="object"/>
</group>
@ -53,7 +52,7 @@
<label string = "Entry Lines Created." colspan="2"/>
<newline/>
<button icon="gtk-ok" special="cancel" string="Ok"/>
<button icon="gtk-execute" string="Open" name="open_moves" type="object"/>
<button icon="gtk-execute" string="Open" name="open_moves" type="object" default_focus='1'/>
</group>
</form>
</field>
@ -69,7 +68,7 @@
<label string = "Are you sure you want to create entries?" colspan="2"/>
<newline/>
<button icon="gtk-ok" special="cancel" string="Cancel"/>
<button icon="gtk-execute" string="Ok" name="create_entries" type="object"/>
<button icon="gtk-execute" string="Ok" name="create_entries" type="object" default_focus='1'/>
</group>
</form>
</field>

View File

@ -57,6 +57,7 @@ class account_vat_declaration(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.vat.declaration',
'datas': datas,
'nodestroy':True,
}
account_vat_declaration()