[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', 'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance', 'report_name': 'account.account.balance',
'datas': data, 'datas': data,
'nodestroy':True,
} }
def _check_date(self, cr, uid, data, context=None): 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', 'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance', 'report_name': 'account.account.balance',
'datas': data, 'datas': data,
'nodestroy':True,
} }
else: else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year')) 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', 'type': 'ir.actions.report.xml',
'report_name': 'account.balancesheet.horizontal', 'report_name': 'account.balancesheet.horizontal',
'datas': data, 'datas': data,
'nodestroy':True,
} }
else: else:
return { return {
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'account.balancesheet', 'report_name': 'account.balancesheet',
'datas': data, 'datas': data,
'nodestroy':True,
} }
else: else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year')) 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', 'type': 'ir.actions.report.xml',
'report_name': 'account.central.journal', 'report_name': 'account.central.journal',
'datas': datas, 'datas': datas,
'nodestroy':True,
} }
account_central_journal() account_central_journal()

View File

@ -74,14 +74,12 @@ class account_compare_account_balance_report(osv.osv_memory):
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance.landscape', 'report_name': 'account.account.balance.landscape',
'datas': data, 'datas': data,
'nodestroy':True,
} }
else: else:
return { return {
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'account.balance.account.balance', 'report_name': 'account.balance.account.balance',
'datas': data, 'datas': data,
'nodestroy':True,
} }
if data['form']['format_perc']==1: if data['form']['format_perc']==1:
if len(data['form']['fiscalyear'])<=2: if len(data['form']['fiscalyear'])<=2:
@ -90,14 +88,12 @@ class account_compare_account_balance_report(osv.osv_memory):
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance.landscape', 'report_name': 'account.account.balance.landscape',
'datas': data, 'datas': data,
'nodestroy':True,
} }
else: else:
return { return {
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'account.balance.account.balance', 'report_name': 'account.balance.account.balance',
'datas': data, 'datas': data,
'nodestroy':True,
} }
else: else:
if len(data['form']['fiscalyear'])==3: if len(data['form']['fiscalyear'])==3:
@ -106,7 +102,6 @@ class account_compare_account_balance_report(osv.osv_memory):
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance.landscape', 'report_name': 'account.account.balance.landscape',
'datas': data, 'datas': data,
'nodestroy':True,
} }
else: 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.')) 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', 'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance.landscape', 'report_name': 'account.account.balance.landscape',
'datas': data, 'datas': data,
'nodestroy':True,
} }
else: 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.')) 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', 'type': 'ir.actions.report.xml',
'report_name': 'account.account.balance.landscape', 'report_name': 'account.account.balance.landscape',
'datas': data, 'datas': data,
'nodestroy':True,
} }
else: else:
return { return {
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'account.balance.account.balance', 'report_name': 'account.balance.account.balance',
'datas': data, 'datas': data,
'nodestroy':True,
} }
account_compare_account_balance_report() account_compare_account_balance_report()

View File

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

View File

@ -107,14 +107,12 @@ class account_general_ledger_report(osv.osv_memory):
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'account.general.ledger_landscape', 'report_name': 'account.general.ledger_landscape',
'datas': data, 'datas': data,
'nodestroy':True,
} }
else: else:
return { return {
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'account.general.ledger', 'report_name': 'account.general.ledger',
'datas': data, 'datas': data,
'nodestroy':True,
} }
else: else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year')) 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', 'type': 'ir.actions.report.xml',
'report_name': 'account.general.ledger_landscape', 'report_name': 'account.general.ledger_landscape',
'datas': data, 'datas': data,
'nodestroy':True,
} }
else: else:
return { return {
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'account.general.ledger', 'report_name': 'account.general.ledger',
'datas': data, 'datas': data,
'nodestroy':True,
} }
account_general_ledger_report() account_general_ledger_report()

View File

@ -82,7 +82,6 @@ class account_partner_balance(osv.osv_memory):
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'account.partner.balance', 'report_name': 'account.partner.balance',
'datas': data, 'datas': data,
'nodestroy':True,
} }
def _check_date(self, cr, uid, data, context): def _check_date(self, cr, uid, data, context):
@ -98,7 +97,6 @@ class account_partner_balance(osv.osv_memory):
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'account.partner.balance', 'report_name': 'account.partner.balance',
'datas': data, 'datas': data,
'nodestroy':True,
} }
else: else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year')) 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', 'type': 'ir.actions.report.xml',
'report_name': 'pl.account.horizontal', 'report_name': 'pl.account.horizontal',
'datas': data, 'datas': data,
'nodestroy':True,
} }
else: else:
return { return {
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'pl.account', 'report_name': 'pl.account',
'datas': data, 'datas': data,
'nodestroy':True,
} }
else: else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year')) 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', 'type': 'ir.actions.report.xml',
'report_name': 'account.journal.period.print', 'report_name': 'account.journal.period.print',
'datas': datas, 'datas': datas,
'nodestroy':True,
} }
account_print_journal() account_print_journal()

View File

@ -97,14 +97,12 @@ class account_partner_ledger(osv.osv_memory):
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'account.third_party_ledger', 'report_name': 'account.third_party_ledger',
'datas': data, 'datas': data,
'nodestroy':True,
} }
else: else:
return { return {
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'account.third_party_ledger_other', 'report_name': 'account.third_party_ledger_other',
'datas': data, 'datas': data,
'nodestroy':True,
} }
def _check_date(self, cr, uid, data, context=None): 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', 'type': 'ir.actions.report.xml',
'report_name': 'account.third_party_ledger', 'report_name': 'account.third_party_ledger',
'datas': data, 'datas': data,
'nodestroy':True,
} }
else: else:
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year')) raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year'))

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -674,7 +674,6 @@ class marketing_campaign_workitem(osv.osv):
'type' : 'ir.actions.report.xml', 'type' : 'ir.actions.report.xml',
'report_name': wi_obj.activity_id.report_id.report_name, 'report_name': wi_obj.activity_id.report_id.report_name,
'datas' : datas, 'datas' : datas,
'nodestroy': True,
} }
else: else:
raise osv.except_osv(_('No preview'),_('The current step for this item has no email or report to preview.')) 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', 'type': 'ir.actions.report.xml',
'report_name': 'survey.browse.response', 'report_name': 'survey.browse.response',
'datas': datas, 'datas': datas,
'nodestroy': True,
'context' : context 'context' : context
} }
else: else:
@ -135,7 +134,6 @@ class survey(osv.osv):
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'survey.form', 'report_name': 'survey.form',
'datas': datas, 'datas': datas,
'nodestroy':True,
'context' : context 'context' : context
} }
return report return report