[IMP]:removed unncessary 'nodestroy' from wizard

bzr revid: nch@tinyerp.com-20100730060643-qpp6peczbz631gd8
This commit is contained in:
Rga 2010-07-30 11:36:43 +05:30 committed by nch@tinyerp.com
parent 14f89b5b50
commit 86ed2c87a6
17 changed files with 30 additions and 64 deletions

View File

@ -109,7 +109,6 @@ 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):
@ -128,7 +127,6 @@ 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

@ -139,14 +139,12 @@ class account_bs_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.balancesheet.horizontal',
'datas': data,
'nodestroy':True,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.balancesheet',
'datas': data,
'nodestroy':True,
}
else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year'))

View File

@ -52,7 +52,6 @@ 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,14 +74,12 @@ 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:
@ -90,14 +88,12 @@ 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:
@ -106,7 +102,6 @@ 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.'))
@ -119,7 +114,6 @@ 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.'))
@ -129,14 +123,12 @@ 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

@ -52,7 +52,6 @@ class account_general_journal(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.general.journal',
'datas': datas,
'nodestroy':True,
}
account_general_journal()

View File

@ -107,14 +107,12 @@ 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'))
@ -141,14 +139,12 @@ 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

@ -82,7 +82,6 @@ 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):
@ -98,7 +97,6 @@ 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

@ -136,14 +136,12 @@ class account_pl_report(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'pl.account.horizontal',
'datas': data,
'nodestroy':True,
}
else:
return {
'type': 'ir.actions.report.xml',
'report_name': 'pl.account',
'datas': data,
'nodestroy':True,
}
else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year'))

View File

@ -59,7 +59,6 @@ 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()

View File

@ -97,14 +97,12 @@ 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):
@ -122,7 +120,6 @@ 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

@ -22,43 +22,42 @@
from osv import osv, fields
class account_vat_declaration(osv.osv_memory):
_name = 'account.vat.declaration'
_description = 'Account Vat Declaration'
_name = 'account.vat.declaration'
_description = 'Account Vat Declaration'
_columns = {
_columns = {
'based_on': fields.selection([('invoices','Invoices'),
('payments','Payments'),],
'Based On', required=True),
('payments','Payments'),],
'Based On', required=True),
'company_id': fields.many2one('res.company', 'Company', required=True),
'periods': fields.many2many('account.period', 'vat_period_rel', 'vat_id', 'period_id', 'Periods', help="All periods if empty"),
}
'periods': fields.many2many('account.period', 'vat_period_rel', 'vat_id', 'period_id', 'Periods', help="All periods if empty"),
}
def _get_company(self, cr, uid, context={}):
user_obj = self.pool.get('res.users')
company_obj = self.pool.get('res.company')
user = user_obj.browse(cr, uid, uid, context=context)
if user.company_id:
return user.company_id.id
else:
return company_obj.search(cr, uid, [('parent_id', '=', False)])[0]
def _get_company(self, cr, uid, context={}):
user_obj = self.pool.get('res.users')
company_obj = self.pool.get('res.company')
user = user_obj.browse(cr, uid, uid, context=context)
if user.company_id:
return user.company_id.id
else:
return company_obj.search(cr, uid, [('parent_id', '=', False)])[0]
_defaults = {
'based_on': 'invoices',
'company_id': _get_company
}
_defaults = {
'based_on': 'invoices',
'company_id': _get_company
}
def create_vat(self, cr, uid, ids, context={}):
if context is None:
context = {}
datas = {'ids': context.get('active_ids', [])}
datas['model'] = 'account.tax.code'
datas['form'] = self.read(cr, uid, ids)[0]
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.vat.declaration',
'datas': datas,
'nodestroy':True,
}
def create_vat(self, cr, uid, ids, context={}):
if context is None:
context = {}
datas = {'ids': context.get('active_ids', [])}
datas['model'] = 'account.tax.code'
datas['form'] = self.read(cr, uid, ids)[0]
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.vat.declaration',
'datas': datas,
}
account_vat_declaration()

View File

@ -67,7 +67,6 @@ class account_crossovered_analytic(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account.analytic.account.crossovered.analytic',
'datas': datas,
'nodestroy': True
}
account_crossovered_analytic()

View File

@ -304,7 +304,6 @@ class account_followup_print_all(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'account_followup.followup.print',
'datas': datas,
'nodestroy': True
}
account_followup_print_all()

View File

@ -63,7 +63,6 @@ class hr_payroll_employees_detail(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'employees.salary',
'datas': datas,
'nodestroy':True,
}
hr_payroll_employees_detail()

View File

@ -65,7 +65,6 @@ class hr_payroll_year_salary(osv.osv_memory):
'type': 'ir.actions.report.xml',
'report_name': 'year.salary',
'datas': datas,
'nodestroy':True,
}
hr_payroll_year_salary()

View File

@ -674,7 +674,6 @@ class marketing_campaign_workitem(osv.osv):
'type' : 'ir.actions.report.xml',
'report_name': wi_obj.activity_id.report_id.report_name,
'datas' : datas,
'nodestroy': True,
}
else:
raise osv.except_osv(_('No preview'),_('The current step for this item has no email or report to preview.'))

View File

@ -124,7 +124,6 @@ class survey(osv.osv):
'type': 'ir.actions.report.xml',
'report_name': 'survey.browse.response',
'datas': datas,
'nodestroy': True,
'context' : context
}
else:
@ -135,7 +134,6 @@ class survey(osv.osv):
'type': 'ir.actions.report.xml',
'report_name': 'survey.form',
'datas': datas,
'nodestroy':True,
'context' : context
}
return report