From c3098f4f437708c7b2d6d4a52cd02950c5b67f31 Mon Sep 17 00:00:00 2001 From: "uco (OpenERP)" Date: Tue, 28 Dec 2010 16:14:45 +0530 Subject: [PATCH] [FIX] account..l10n_ch: Pass return {'type': 'ir.actions.act_window_close'} instead of return {} in osv_memory/normal wizards.(lp:691544) bzr revid: uco@tinyerp.com-20101228104445-h5q9jg8mq7dmdc51 --- addons/account/wizard/account_change_currency.py | 2 +- addons/account/wizard/account_fiscalyear_close.py | 2 +- addons/account/wizard/account_fiscalyear_close_state.py | 2 +- addons/account/wizard/account_invoice_state.py | 4 ++-- addons/account/wizard/account_open_closed_fiscalyear.py | 2 +- addons/account/wizard/account_period_close.py | 2 +- addons/account/wizard/account_reconcile.py | 6 +++--- addons/account/wizard/account_reconcile_partner_process.py | 2 +- addons/account/wizard/account_state_open.py | 2 +- addons/account/wizard/account_unreconcile.py | 4 ++-- addons/account/wizard/account_validate_account_move.py | 4 ++-- .../wizard/analytic_plan_create_model.py | 2 +- addons/account_payment/wizard/account_payment_order.py | 4 ++-- addons/account_payment/wizard/account_payment_pay.py | 2 +- .../wizard/account_payment_populate_statement.py | 2 +- .../wizard/account_statement_from_invoice.py | 6 +++--- .../account_voucher/wizard/account_voucher_unreconcile.py | 2 +- addons/auction/wizard/auction_aie_send.py | 2 +- addons/auction/wizard/auction_aie_send_result.py | 2 +- addons/auction/wizard/auction_lots_able.py | 2 +- addons/auction/wizard/auction_lots_auction_move.py | 4 ++-- addons/auction/wizard/auction_lots_buyer_map.py | 2 +- addons/auction/wizard/auction_lots_cancel.py | 2 +- addons/auction/wizard/auction_lots_enable.py | 2 +- addons/auction/wizard/auction_lots_numerotate.py | 2 +- addons/auction/wizard/auction_pay_buy.py | 2 +- addons/auction/wizard/auction_pay_sel.py | 2 +- addons/auction/wizard/auction_payer_sel.py | 4 ++-- addons/auction/wizard/auction_transfer_unsold_object.py | 2 +- .../base_calendar/wizard/base_calendar_invite_attendee.py | 6 +++--- addons/base_calendar/wizard/base_calendar_set_exrule.py | 2 +- addons/base_calendar/wizard/calendar_event_edit_all.py | 2 +- .../base_module_doc_rst/wizard/generate_relation_graph.py | 2 +- addons/base_module_record/wizard/base_module_record_data.py | 2 +- .../base_module_record/wizard/base_module_record_objects.py | 2 +- addons/base_report_creator/wizard/report_menu_create.py | 4 ++-- addons/base_report_creator/wizard/wiz_set_filter_fields.py | 4 ++-- addons/board/wizard/board_menu_create.py | 2 +- addons/crm/wizard/crm_add_note.py | 2 +- addons/crm/wizard/crm_lead_to_opportunity.py | 2 +- addons/crm/wizard/crm_merge_opportunities.py | 2 +- addons/crm/wizard/crm_send_email.py | 4 ++-- addons/crm_partner_assign/wizard/crm_forward_to_partner.py | 2 +- addons/delivery/wizard/delivery_sale_order.py | 2 +- addons/event/wizard/event_confirm.py | 2 +- addons/event/wizard/event_confirm_registration.py | 2 +- addons/event_project/wizard/event_project_retro.py | 2 +- addons/hr_attendance/wizard/hr_attendance_sign_in_out.py | 4 ++-- addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py | 6 +++--- addons/idea/wizard/idea_post_vote.py | 2 +- addons/l10n_ch/wizard/bvr_import.py | 2 +- 51 files changed, 69 insertions(+), 69 deletions(-) diff --git a/addons/account/wizard/account_change_currency.py b/addons/account/wizard/account_change_currency.py index 47f9ac9c2c8..d915a1cd34b 100644 --- a/addons/account/wizard/account_change_currency.py +++ b/addons/account/wizard/account_change_currency.py @@ -72,7 +72,7 @@ class account_change_currency(osv.osv_memory): new_price = (line.price_unit / old_rate ) * rate obj_inv_line.write(cr, uid, [line.id], {'price_unit': new_price}) obj_inv.write(cr, uid, [invoice.id], {'currency_id': new_currency}, context=context) - return {} + return {'type': 'ir.actions.act_window_close'} account_change_currency() diff --git a/addons/account/wizard/account_fiscalyear_close.py b/addons/account/wizard/account_fiscalyear_close.py index 42383341828..6190f792c7f 100644 --- a/addons/account/wizard/account_fiscalyear_close.py +++ b/addons/account/wizard/account_fiscalyear_close.py @@ -215,7 +215,7 @@ class account_fiscalyear_close(osv.osv_memory): cr.execute('UPDATE account_fiscalyear ' \ 'SET end_journal_period_id = %s ' \ 'WHERE id = %s', (ids[0], old_fyear.id)) - return {} + return {'type': 'ir.actions.act_window_close'} account_fiscalyear_close() diff --git a/addons/account/wizard/account_fiscalyear_close_state.py b/addons/account/wizard/account_fiscalyear_close_state.py index 9a559d039da..abf054746ce 100644 --- a/addons/account/wizard/account_fiscalyear_close_state.py +++ b/addons/account/wizard/account_fiscalyear_close_state.py @@ -57,7 +57,7 @@ class account_fiscalyear_close_state(osv.osv_memory): fy_pool = self.pool.get('account.fiscalyear') fy_code = fy_pool.browse(cr, uid, fy_id, context=context).code fy_pool.log(cr, uid, fy_id, "Fiscal year '%s' is closed, no more modification allowed." % (fy_code)) - return {} + return {'type': 'ir.actions.act_window_close'} account_fiscalyear_close_state() diff --git a/addons/account/wizard/account_invoice_state.py b/addons/account/wizard/account_invoice_state.py index 2e7a519aa34..7adcb908a34 100644 --- a/addons/account/wizard/account_invoice_state.py +++ b/addons/account/wizard/account_invoice_state.py @@ -43,7 +43,7 @@ class account_invoice_confirm(osv.osv_memory): if record['state'] not in ('draft','proforma','proforma2'): raise osv.except_osv(_('Warning'), _("Selected Invoice(s) cannot be confirmed as they are not in 'Draft' or 'Pro-Forma' state!")) wf_service.trg_validate(uid, 'account.invoice', record['id'], 'invoice_open', cr) - return {} + return {'type': 'ir.actions.act_window_close'} account_invoice_confirm() @@ -67,7 +67,7 @@ class account_invoice_cancel(osv.osv_memory): if record['state'] in ('cancel','paid'): raise osv.except_osv(_('Warning'), _("Selected Invoice(s) cannot be cancelled as they are already in 'Cancelled' or 'Done' state!")) wf_service.trg_validate(uid, 'account.invoice', record['id'], 'invoice_cancel', cr) - return {} + return {'type': 'ir.actions.act_window_close'} account_invoice_cancel() diff --git a/addons/account/wizard/account_open_closed_fiscalyear.py b/addons/account/wizard/account_open_closed_fiscalyear.py index 582bbc36619..541e7b2cbdb 100644 --- a/addons/account/wizard/account_open_closed_fiscalyear.py +++ b/addons/account/wizard/account_open_closed_fiscalyear.py @@ -42,7 +42,7 @@ class account_open_closed_fiscalyear(osv.osv_memory): ids_move = move_obj.search(cr, uid, [('journal_id','=',period_journal.journal_id.id),('period_id','=',period_journal.period_id.id)]) if ids_move: cr.execute('delete from account_move where id IN %s', (tuple(ids_move),)) - return {} + return {'type': 'ir.actions.act_window_close'} account_open_closed_fiscalyear() diff --git a/addons/account/wizard/account_period_close.py b/addons/account/wizard/account_period_close.py index 3b3acecc389..5b7589d7830 100644 --- a/addons/account/wizard/account_period_close.py +++ b/addons/account/wizard/account_period_close.py @@ -50,7 +50,7 @@ class account_period_close(osv.osv_memory): # Log message for Period for period_id, name in period_pool.name_get(cr, uid, [id]): period_pool.log(cr, uid, period_id, "Period '%s' is closed, no more modification allowed for this period." % (name)) - return {} + return {'type': 'ir.actions.act_window_close'} account_period_close() diff --git a/addons/account/wizard/account_reconcile.py b/addons/account/wizard/account_reconcile.py index f89ffb47a76..8131f6a9668 100644 --- a/addons/account/wizard/account_reconcile.py +++ b/addons/account/wizard/account_reconcile.py @@ -101,7 +101,7 @@ class account_move_line_reconcile(osv.osv_memory): context.update({'stop_reconcile': True}) account_move_line_obj.reconcile(cr, uid, context['active_ids'], 'manual', account_id, period_id, journal_id, context=context) - return {} + return {'type': 'ir.actions.act_window_close'} account_move_line_reconcile() @@ -145,7 +145,7 @@ class account_move_line_reconcile_writeoff(osv.osv_memory): if context is None: context = {} account_move_line_obj.reconcile_partial(cr, uid, context['active_ids'], 'manual', context=context) - return {} + return {'type': 'ir.actions.act_window_close'} def trans_rec_reconcile(self, cr, uid, ids, context=None): account_move_line_obj = self.pool.get('account.move.line') @@ -169,7 +169,7 @@ class account_move_line_reconcile_writeoff(osv.osv_memory): context.update({'stop_reconcile': True}) account_move_line_obj.reconcile(cr, uid, context['active_ids'], 'manual', account_id, period_id, journal_id, context=context) - return {} + return {'type': 'ir.actions.act_window_close'} account_move_line_reconcile_writeoff() diff --git a/addons/account/wizard/account_reconcile_partner_process.py b/addons/account/wizard/account_reconcile_partner_process.py index 9f91d1ec2d2..7cfeff70891 100644 --- a/addons/account/wizard/account_reconcile_partner_process.py +++ b/addons/account/wizard/account_reconcile_partner_process.py @@ -83,7 +83,7 @@ class account_partner_reconcile_process(osv.osv_memory): res_partner_obj.write(cr, uid, partner_id[0], {'last_reconciliation_date': time.strftime('%Y-%m-%d')}, context) #TODO: we have to find a way to update the context of the current tab (we could open a new tab with the context but it's not really handy) #TODO: remove that comments when the client side dev is done - return {} + return {'type': 'ir.actions.act_window_close'} _columns = { 'to_reconcile': fields.float('Remaining Partners', readonly=True, help='This is the remaining partners for who you should check if there is something to reconcile or not. This figure already count the current partner as reconciled.'), diff --git a/addons/account/wizard/account_state_open.py b/addons/account/wizard/account_state_open.py index 2a03a80aefa..81705771d67 100644 --- a/addons/account/wizard/account_state_open.py +++ b/addons/account/wizard/account_state_open.py @@ -37,7 +37,7 @@ class account_state_open(osv.osv_memory): raise osv.except_osv(_('Warning'), _('Invoice is already reconciled')) wf_service = netsvc.LocalService("workflow") res = wf_service.trg_validate(uid, 'account.invoice', context['active_ids'][0], 'open_test', cr) - return {} + return {'type': 'ir.actions.act_window_close'} account_state_open() diff --git a/addons/account/wizard/account_unreconcile.py b/addons/account/wizard/account_unreconcile.py index 3a067b4a598..0e6c38f9d7c 100644 --- a/addons/account/wizard/account_unreconcile.py +++ b/addons/account/wizard/account_unreconcile.py @@ -31,7 +31,7 @@ class account_unreconcile(osv.osv_memory): context = {} if context.get('active_ids', False): obj_move_line._remove_move_reconcile(cr, uid, context['active_ids'], context=context) - return {} + return {'type': 'ir.actions.act_window_close'} account_unreconcile() @@ -46,7 +46,7 @@ class account_unreconcile_reconcile(osv.osv_memory): rec_ids = context['active_ids'] if rec_ids: obj_move_reconcile.unlink(cr, uid, rec_ids, context=context) - return {} + return {'type': 'ir.actions.act_window_close'} account_unreconcile_reconcile() diff --git a/addons/account/wizard/account_validate_account_move.py b/addons/account/wizard/account_validate_account_move.py index f840d2b5532..ddcfa2c5353 100644 --- a/addons/account/wizard/account_validate_account_move.py +++ b/addons/account/wizard/account_validate_account_move.py @@ -38,7 +38,7 @@ class validate_account_move(osv.osv_memory): if not ids_move: raise osv.except_osv(_('Warning'), _('Specified Journal does not have any account move entries in draft state for this period')) obj_move.button_validate(cr, uid, ids_move, context=context) - return {} + return {'type': 'ir.actions.act_window_close'} validate_account_move() @@ -60,7 +60,7 @@ class validate_account_move_lines(osv.osv_memory): if not move_ids: raise osv.except_osv(_('Warning'), _('Selected Entry Lines does not have any account move enties in draft state')) obj_move.button_validate(cr, uid, move_ids, context) - return {} + return {'type': 'ir.actions.act_window_close'} validate_account_move_lines() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_analytic_plans/wizard/analytic_plan_create_model.py b/addons/account_analytic_plans/wizard/analytic_plan_create_model.py index 0581197aaca..1cd3022f60b 100644 --- a/addons/account_analytic_plans/wizard/analytic_plan_create_model.py +++ b/addons/account_analytic_plans/wizard/analytic_plan_create_model.py @@ -53,7 +53,7 @@ class analytic_plan_create_model(osv.osv_memory): 'target': 'new', } else: - return {} + return {'type': 'ir.actions.act_window_close'} analytic_plan_create_model() diff --git a/addons/account_payment/wizard/account_payment_order.py b/addons/account_payment/wizard/account_payment_order.py index b8328aee333..eb0d8b21926 100644 --- a/addons/account_payment/wizard/account_payment_order.py +++ b/addons/account_payment/wizard/account_payment_order.py @@ -65,7 +65,7 @@ class payment_order_create(osv.osv_memory): data = self.read(cr, uid, ids, [], context=context)[0] line_ids = data['entries'] if not line_ids: - return {} + return {'type': 'ir.actions.act_window_close'} payment = order_obj.browse(cr, uid, context['active_id'], context=context) t = None @@ -90,7 +90,7 @@ class payment_order_create(osv.osv_memory): 'date': date_to_pay, 'currency': line.invoice and line.invoice.currency_id.id or False, }, context=context) - return {} + return {'type': 'ir.actions.act_window_close'} def search_entries(self, cr, uid, ids, context=None): line_obj = self.pool.get('account.move.line') diff --git a/addons/account_payment/wizard/account_payment_pay.py b/addons/account_payment/wizard/account_payment_pay.py index 6627ffaa614..ca9311b1f88 100644 --- a/addons/account_payment/wizard/account_payment_pay.py +++ b/addons/account_payment/wizard/account_payment_pay.py @@ -37,7 +37,7 @@ class account_payment_make_payment(osv.osv_memory): # obj_act = self.pool.get('ir.actions.act_window') # order = obj_payment_order.browse(cr, uid, context['active_id'], context) obj_payment_order.set_done(cr, uid, [context['active_id']], context) - return {} + return {'type': 'ir.actions.act_window_close'} # t = order.mode and order.mode.type.code or 'manual' # if t == 'manual': # obj_payment_order.set_done(cr,uid,context['active_id'],context) diff --git a/addons/account_payment/wizard/account_payment_populate_statement.py b/addons/account_payment/wizard/account_payment_populate_statement.py index f99189a8444..340ab4bcb03 100644 --- a/addons/account_payment/wizard/account_payment_populate_statement.py +++ b/addons/account_payment/wizard/account_payment_populate_statement.py @@ -65,7 +65,7 @@ class account_payment_populate_statement(osv.osv_memory): data = self.read(cr, uid, ids, [], context=context)[0] line_ids = data['lines'] if not line_ids: - return {} + return {'type': 'ir.actions.act_window_close'} statement = statement_obj.browse(cr, uid, context['active_id'], context=context) diff --git a/addons/account_voucher/wizard/account_statement_from_invoice.py b/addons/account_voucher/wizard/account_statement_from_invoice.py index fa1a66e0135..a9fb7d10a32 100644 --- a/addons/account_voucher/wizard/account_statement_from_invoice.py +++ b/addons/account_voucher/wizard/account_statement_from_invoice.py @@ -39,11 +39,11 @@ class account_statement_from_invoice_lines(osv.osv_memory): context = {} statement_id = context.get('statement_id', False) if not statement_id: - return {} + return {'type': 'ir.actions.act_window_close'} data = self.read(cr, uid, ids, context=context)[0] line_ids = data['line_ids'] if not line_ids: - return {} + return {'type': 'ir.actions.act_window_close'} line_obj = self.pool.get('account.move.line') statement_obj = self.pool.get('account.bank.statement') @@ -115,7 +115,7 @@ class account_statement_from_invoice_lines(osv.osv_memory): 'voucher_id': voucher_id, 'date': time.strftime('%Y-%m-%d'), #time.strftime('%Y-%m-%d'), #line.date_maturity or, }, context=context) - return {} + return {'type': 'ir.actions.act_window_close'} account_statement_from_invoice_lines() diff --git a/addons/account_voucher/wizard/account_voucher_unreconcile.py b/addons/account_voucher/wizard/account_voucher_unreconcile.py index 2bfdfd1ecf8..42a9e1c5ec2 100644 --- a/addons/account_voucher/wizard/account_voucher_unreconcile.py +++ b/addons/account_voucher/wizard/account_voucher_unreconcile.py @@ -55,7 +55,7 @@ class account_voucher_unreconcile(osv.osv_memory): # wf_service = netsvc.LocalService("workflow") # wf_service.trg_validate(uid, 'account.voucher', context.get('active_id'), 'cancel_voucher', cr) - return {} + return {'type': 'ir.actions.act_window_close'} account_voucher_unreconcile() diff --git a/addons/auction/wizard/auction_aie_send.py b/addons/auction/wizard/auction_aie_send.py index 7c904cf850b..1caec13b852 100644 --- a/addons/auction/wizard/auction_aie_send.py +++ b/addons/auction/wizard/auction_aie_send.py @@ -220,7 +220,7 @@ class auction_lots_send_aie(osv.osv_memory): def send_pdf(self, cr, uid, ids, context=None): threaded_calculation = threading.Thread(target=self._send, args=(cr, uid, ids, context)) threaded_calculation.start() - return {} + return {'type': 'ir.actions.act_window_close'} auction_lots_send_aie() diff --git a/addons/auction/wizard/auction_aie_send_result.py b/addons/auction/wizard/auction_aie_send_result.py index 5b2b4eca7fd..d6102dd0522 100644 --- a/addons/auction/wizard/auction_aie_send_result.py +++ b/addons/auction/wizard/auction_aie_send_result.py @@ -137,7 +137,7 @@ class auction_lots_pay(osv.osv_memory): lots = service.execute(cr.dbname, uid, 'auction.lots', 'read', context['active_ids'], ['obj_num','obj_price']) args = pickle.dumps(lots) self._catalog_send(datas['uname'], datas['password'], datas['dates'], args) - return {} + return {'type': 'ir.actions.act_window_close'} auction_lots_pay() diff --git a/addons/auction/wizard/auction_lots_able.py b/addons/auction/wizard/auction_lots_able.py index 369d762727a..8604d691456 100644 --- a/addons/auction/wizard/auction_lots_able.py +++ b/addons/auction/wizard/auction_lots_able.py @@ -41,6 +41,6 @@ class auction_lots_able(osv.osv_memory): if context is None: context = {} self.pool.get('auction.lots').write(cr, uid, context.get('active_ids', []), {'ach_emp':True}) - return {} + return {'type': 'ir.actions.act_window_close'} auction_lots_able() diff --git a/addons/auction/wizard/auction_lots_auction_move.py b/addons/auction/wizard/auction_lots_auction_move.py index 97330f922fe..cc698887afd 100644 --- a/addons/auction/wizard/auction_lots_auction_move.py +++ b/addons/auction/wizard/auction_lots_auction_move.py @@ -52,7 +52,7 @@ class auction_lots_auction_move(osv.osv_memory): rec_ids = auction_lots_obj.browse(cr, uid, context.get('active_ids', [])) for current in self.browse(cr, uid, ids, context=context): if not (current.auction_id and len(context.get('active_ids', []))): - return {} + return {'type': 'ir.actions.act_window_close'} for rec in rec_ids: new_id = auction_lot_history_obj.create(cr, uid, { @@ -70,7 +70,7 @@ class auction_lots_auction_move(osv.osv_memory): 'sel_inv_id': None, 'obj_num': None, 'state': 'draft'}) - return {} + return {'type': 'ir.actions.act_window_close'} auction_lots_auction_move() diff --git a/addons/auction/wizard/auction_lots_buyer_map.py b/addons/auction/wizard/auction_lots_buyer_map.py index e50f11fd1ec..436d51a66c7 100644 --- a/addons/auction/wizard/auction_lots_buyer_map.py +++ b/addons/auction/wizard/auction_lots_buyer_map.py @@ -90,7 +90,7 @@ class wiz_auc_lots_buyer_map(osv.osv_memory): for lots in lots_obj.browse(cr, uid, rec_ids, context=context): if lots.ach_login == current.ach_login: lots_obj.write(cr, uid, [lots.id], {'ach_uid': current.ach_uid.id}, context=context) - return {} + return {'type': 'ir.actions.act_window_close'} def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): diff --git a/addons/auction/wizard/auction_lots_cancel.py b/addons/auction/wizard/auction_lots_cancel.py index 62313315bd9..3974241a071 100644 --- a/addons/auction/wizard/auction_lots_cancel.py +++ b/addons/auction/wizard/auction_lots_cancel.py @@ -49,7 +49,7 @@ class auction_lots_cancel(osv.osv): supplier_refund_inv_id = invoice_obj.refund(cr, uid, [lot.ach_inv_id.id]) if lot.sel_inv_id: customer_refund_inv_id = invoice_obj.refund(cr, uid, [lot.sel_inv_id.id]) - return {} + return {'type': 'ir.actions.act_window_close'} _columns = { } diff --git a/addons/auction/wizard/auction_lots_enable.py b/addons/auction/wizard/auction_lots_enable.py index ed6b8950d2e..290664ba697 100644 --- a/addons/auction/wizard/auction_lots_enable.py +++ b/addons/auction/wizard/auction_lots_enable.py @@ -38,6 +38,6 @@ class auction_lots_enable(osv.osv_memory): if context is None: context = {} self.pool.get('auction.lots').write(cr, uid, context.get('active_id',False), {'ach_emp':False}) - return {} + return {'type': 'ir.actions.act_window_close'} auction_lots_enable() diff --git a/addons/auction/wizard/auction_lots_numerotate.py b/addons/auction/wizard/auction_lots_numerotate.py index 0712e21565e..22bdac5a67f 100644 --- a/addons/auction/wizard/auction_lots_numerotate.py +++ b/addons/auction/wizard/auction_lots_numerotate.py @@ -178,7 +178,7 @@ class auction_lots_numerotate(osv.osv_memory): for rec_id in rec_ids: lots_obj.write(cr, uid, [rec_id.id], {'obj_num':nbr}) nbr+=1 - return {} + return {'type': 'ir.actions.act_window_close'} auction_lots_numerotate() diff --git a/addons/auction/wizard/auction_pay_buy.py b/addons/auction/wizard/auction_pay_buy.py index dfad93dc759..b914dd1c643 100644 --- a/addons/auction/wizard/auction_pay_buy.py +++ b/addons/auction/wizard/auction_pay_buy.py @@ -100,7 +100,7 @@ class auction_pay_buy(osv.osv_memory): }) for lot in lots: lot_obj.write(cr, uid, [lot.id], {'statement_id':[(4, new_id)]}) - return {} + return {'type': 'ir.actions.act_window_close'} auction_pay_buy() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/auction/wizard/auction_pay_sel.py b/addons/auction/wizard/auction_pay_sel.py index 7265a4e7f98..77484bbe988 100644 --- a/addons/auction/wizard/auction_pay_sel.py +++ b/addons/auction/wizard/auction_pay_sel.py @@ -52,6 +52,6 @@ class auction_pay_sel(osv.osv_memory): journal_id = datas.get('journal_id', False) if lot.sel_inv_id: p = invoice_obj.pay_and_reconcile(['lot.sel_inv_id.id'], datas['amount'], datas['dest_account_id'], journal_id, account_id, period_id, journal_id, context) - return {} + return {'type': 'ir.actions.act_window_close'} auction_pay_sel() diff --git a/addons/auction/wizard/auction_payer_sel.py b/addons/auction/wizard/auction_payer_sel.py index 808826cfc23..8ad2f5ca019 100644 --- a/addons/auction/wizard/auction_payer_sel.py +++ b/addons/auction/wizard/auction_payer_sel.py @@ -29,7 +29,7 @@ class auction_payer(osv.osv_memory): if context is None: context = {} self.pool.get('auction.lots').write(cr, uid, context.get('active_ids', []), {'is_ok':True, 'state':'paid'}) - return {} + return {'type': 'ir.actions.act_window_close'} auction_payer() @@ -50,7 +50,7 @@ class auction_payer_sel(osv.osv_memory): if context is None: context = {} self.pool.get('auction.lots').write(cr, uid, context.get('active_ids', []), {'paid_vnd':True}) - return {} + return {'type': 'ir.actions.act_window_close'} auction_payer_sel() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/auction/wizard/auction_transfer_unsold_object.py b/addons/auction/wizard/auction_transfer_unsold_object.py index 8bc0cb8cb5b..f593a36de2e 100644 --- a/addons/auction/wizard/auction_transfer_unsold_object.py +++ b/addons/auction/wizard/auction_transfer_unsold_object.py @@ -82,6 +82,6 @@ class auction_transfer_unsold_object(osv.osv): 'ach_inv_id':None, 'sel_inv_id':None, 'state':'draft'}) - return {} + return {'type': 'ir.actions.act_window_close'} auction_transfer_unsold_object() \ No newline at end of file diff --git a/addons/base_calendar/wizard/base_calendar_invite_attendee.py b/addons/base_calendar/wizard/base_calendar_invite_attendee.py index 48f39e609f9..ea4d5aca85f 100644 --- a/addons/base_calendar/wizard/base_calendar_invite_attendee.py +++ b/addons/base_calendar/wizard/base_calendar_invite_attendee.py @@ -68,7 +68,7 @@ send an Email to Invited Person') model = False context_id = context and context.get('active_id', False) or False if not context or not context.get('model'): - return {} + return {'type': 'ir.actions.act_window_close'} else: model = context.get('model') @@ -89,7 +89,7 @@ send an Email to Invited Person') if context_id: ref = {'ref': '%s,%s' % (model, base_calendar.base_calendar_id2real_id(context_id))} else: - return {} + return {'type': 'ir.actions.act_window_close'} if type == 'internal': if not datas.get('user_ids'): @@ -144,7 +144,7 @@ send an Email to Invited Person') att_obj._send_mail(cr, uid, attendees, mail_to, \ email_from = current_user.user_email or tools.config.get('email_from', False)) - return {} + return {'type': 'ir.actions.act_window_close'} def onchange_partner_id(self, cr, uid, ids, partner_id, *args, **argv): diff --git a/addons/base_calendar/wizard/base_calendar_set_exrule.py b/addons/base_calendar/wizard/base_calendar_set_exrule.py index 4f5d57235e5..80fe1e44720 100644 --- a/addons/base_calendar/wizard/base_calendar_set_exrule.py +++ b/addons/base_calendar/wizard/base_calendar_set_exrule.py @@ -150,7 +150,7 @@ class base_calendar_set_exrule(osv.osv_memory): + enddate + monthstring + yearstring model_obj.write(cr, uid, ex_id,{'exrule': exrule_string}) - return {} + return {'type': 'ir.actions.act_window_close'} _defaults = { 'freq': lambda *x: 'None', diff --git a/addons/base_calendar/wizard/calendar_event_edit_all.py b/addons/base_calendar/wizard/calendar_event_edit_all.py index a9b0a9f347e..23f67f579f2 100644 --- a/addons/base_calendar/wizard/calendar_event_edit_all.py +++ b/addons/base_calendar/wizard/calendar_event_edit_all.py @@ -78,7 +78,7 @@ class calendar_event_edit_all(osv.osv_memory): model = context.get('model', False) model_obj = self.pool.get(model) model_obj.modify_all(cr, uid, [context_id], datas, context=context) - return {} + return {'type': 'ir.actions.act_window_close'} _name = "calendar.event.edit.all" _description = "Calendar Edit all event" diff --git a/addons/base_module_doc_rst/wizard/generate_relation_graph.py b/addons/base_module_doc_rst/wizard/generate_relation_graph.py index 7b04f183129..9f789f0cc7a 100644 --- a/addons/base_module_doc_rst/wizard/generate_relation_graph.py +++ b/addons/base_module_doc_rst/wizard/generate_relation_graph.py @@ -35,7 +35,7 @@ def _get_graph(self, cr, uid, datas, context=None): module_data = mod_obj.get_relation_graph(cr, uid, module.name, context=context) if module_data['module_file']: mod_obj.write(cr, uid, [module.id], {'file_graph': module_data['module_file']}, context=context) - return {} + return {'type': 'ir.actions.act_window_close'} class create_graph(wizard.interface): states = { diff --git a/addons/base_module_record/wizard/base_module_record_data.py b/addons/base_module_record/wizard/base_module_record_data.py index 8071a01ab11..fa9c8a6826e 100644 --- a/addons/base_module_record/wizard/base_module_record_data.py +++ b/addons/base_module_record/wizard/base_module_record_data.py @@ -100,7 +100,7 @@ def _record_objects(self, cr, uid, data, context): for s_id in search_ids: args=(cr.dbname,uid,obj_name,'copy',s_id,{},context) mod.recording_data.append(('query',args, {}, s_id)) - return {} + return {'type': 'ir.actions.act_window_close'} def _check(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) diff --git a/addons/base_module_record/wizard/base_module_record_objects.py b/addons/base_module_record/wizard/base_module_record_objects.py index 065e69c171b..9b92a751cdc 100644 --- a/addons/base_module_record/wizard/base_module_record_objects.py +++ b/addons/base_module_record/wizard/base_module_record_objects.py @@ -90,7 +90,7 @@ def _record_objects(self, cr, uid, data, context): for s_id in search_ids: args=(cr.dbname,uid,obj_name,'copy',s_id,{},context) mod.recording_data.append(('query',args, {}, s_id)) - return {} + return {'type': 'ir.actions.act_window_close'} def inter_call(self,cr,uid,data,context): res=base_module_save._create_module(self,cr, uid, data, context) diff --git a/addons/base_report_creator/wizard/report_menu_create.py b/addons/base_report_creator/wizard/report_menu_create.py index efa61c556d1..f209bd05526 100644 --- a/addons/base_report_creator/wizard/report_menu_create.py +++ b/addons/base_report_creator/wizard/report_menu_create.py @@ -49,7 +49,7 @@ class report_menu_create(osv.osv_memory): if context_id: data = self.browse(cr, uid, ids, context=context) if not data: - return {} + return {'type': 'ir.actions.act_window_close'} data = data[0] board = obj_board.browse(cr, uid, context_id, context=context) @@ -77,7 +77,7 @@ class report_menu_create(osv.osv_memory): 'action': 'ir.actions.act_window, ' + str(action_id) }, context=context) obj_board.write(cr, uid, context_id, {'menu_id': menu_id}) - return {} + return {'type': 'ir.actions.act_window_close'} report_menu_create() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_report_creator/wizard/wiz_set_filter_fields.py b/addons/base_report_creator/wizard/wiz_set_filter_fields.py index dc7c977e694..0903f968eea 100644 --- a/addons/base_report_creator/wizard/wiz_set_filter_fields.py +++ b/addons/base_report_creator/wizard/wiz_set_filter_fields.py @@ -145,7 +145,7 @@ def _set_filter_value(self, cr, uid, data, context): 'condition' : form_data['condition'] } pooler.get_pool(cr.dbname).get('base_report_creator.report.filter').create(cr,uid,create_dict,context) - return {} + return {'type': 'ir.actions.act_window_close'} def _set_form_value(self, cr, uid, data, context): field_id = data['form']['field_id'] @@ -199,7 +199,7 @@ def _set_operator(self, cr, uid, data, context): elif field.ttype in ('boolean', 'selection'): operator.append(('=','Equals')) operator.append(('<>','Not Equals')) - return {} + return {'type': 'ir.actions.act_window_close'} class set_filter_fields(wizard.interface): states = { diff --git a/addons/board/wizard/board_menu_create.py b/addons/board/wizard/board_menu_create.py index 2b688962265..10d4d80a7f3 100644 --- a/addons/board/wizard/board_menu_create.py +++ b/addons/board/wizard/board_menu_create.py @@ -78,7 +78,7 @@ class board_menu_create(osv.osv_memory): 'action': 'ir.actions.act_window,' + str(action_id) }, context=context) #End Loop - return {} + return {'type': 'ir.actions.act_window_close'} _name = "board.menu.create" _description = "Menu Create" diff --git a/addons/crm/wizard/crm_add_note.py b/addons/crm/wizard/crm_add_note.py index 3c57156a23f..80e6fc6cad2 100644 --- a/addons/crm/wizard/crm_add_note.py +++ b/addons/crm/wizard/crm_add_note.py @@ -50,7 +50,7 @@ class crm_add_note(osv.osv_memory): act = 'case_' + obj.state getattr(case_pool, act)(cr, uid, [case.id]) - return {} + return {'type': 'ir.actions.act_window_close'} def default_get(self, cr, uid, fields, context=None): """ diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py index 7fed3cc742c..b8cdb9feb79 100644 --- a/addons/crm/wizard/crm_lead_to_opportunity.py +++ b/addons/crm/wizard/crm_lead_to_opportunity.py @@ -48,7 +48,7 @@ class crm_lead2opportunity(osv.osv_memory): """ record_id = context and context.get('active_id') or False if not record_id: - return {} + return {'type': 'ir.actions.act_window_close'} leads = self.pool.get('crm.lead') models_data = self.pool.get('ir.model.data') diff --git a/addons/crm/wizard/crm_merge_opportunities.py b/addons/crm/wizard/crm_merge_opportunities.py index 82463c29cf9..dde529b6002 100644 --- a/addons/crm/wizard/crm_merge_opportunities.py +++ b/addons/crm/wizard/crm_merge_opportunities.py @@ -108,7 +108,7 @@ class crm_merge_opportunity(osv.osv_memory): elif this.state in ['cancel', 'open', 'pending']: act = 'case_' + this.state getattr(opp_obj, act)(cr, uid, [record_id]) - return {} + return {'type': 'ir.actions.act_window_close'} _columns = { 'opportunity_ids' : fields.many2many('crm.lead', 'merge_opportunity_rel', 'merge_id', 'opportunity_id', 'Opportunities', domain=[('type', '=', 'opportunity')]), diff --git a/addons/crm/wizard/crm_send_email.py b/addons/crm/wizard/crm_send_email.py index eeb635b7c3b..3ce5942272d 100644 --- a/addons/crm/wizard/crm_send_email.py +++ b/addons/crm/wizard/crm_send_email.py @@ -156,7 +156,7 @@ class crm_send_new_email(osv.osv_memory): act = 'case_' + obj.state getattr(case_pool, act)(cr, uid, [case.id]) - return {} + return {'type': 'ir.actions.act_window_close'} def default_get(self, cr, uid, fields, context=None): """ @@ -217,7 +217,7 @@ class crm_send_new_email(osv.osv_memory): # In the case where the crm.case does not exist in the database if not model: - return {} + return {'type': 'ir.actions.act_window_close'} model_pool = self.pool.get(model) res_id = hist.res_id diff --git a/addons/crm_partner_assign/wizard/crm_forward_to_partner.py b/addons/crm_partner_assign/wizard/crm_forward_to_partner.py index fdb7acff35c..64042c8954d 100644 --- a/addons/crm_partner_assign/wizard/crm_forward_to_partner.py +++ b/addons/crm_partner_assign/wizard/crm_forward_to_partner.py @@ -198,7 +198,7 @@ class crm_lead_forward_to_partner(osv.osv_memory): to_write.update({'email_cc' : ', '.join(new_cc) }) case_pool.write(cr, uid, case.id, to_write, context=context) - return {} + return {'type': 'ir.actions.act_window_close'} def get_lead_details(self, cr, uid, lead_id, context=None): body = [] diff --git a/addons/delivery/wizard/delivery_sale_order.py b/addons/delivery/wizard/delivery_sale_order.py index f20426bbc35..f8bb87cf38c 100644 --- a/addons/delivery/wizard/delivery_sale_order.py +++ b/addons/delivery/wizard/delivery_sale_order.py @@ -113,7 +113,7 @@ class make_delivery(osv.osv_memory): 'type': 'make_to_stock' }) - return {} + return {'type': 'ir.actions.act_window_close'} make_delivery() diff --git a/addons/event/wizard/event_confirm.py b/addons/event/wizard/event_confirm.py index 8151c7ae9e9..e21d523bb12 100644 --- a/addons/event/wizard/event_confirm.py +++ b/addons/event/wizard/event_confirm.py @@ -30,7 +30,7 @@ class event_confirm(osv.osv_memory): def confirm(self, cr, uid, ids, context=None): self.pool.get('event.event').do_confirm(cr, uid, context.get('event_ids', []), context=context) - return {} + return {'type': 'ir.actions.act_window_close'} event_confirm() diff --git a/addons/event/wizard/event_confirm_registration.py b/addons/event/wizard/event_confirm_registration.py index a2fe8170bfd..b122cde02a0 100644 --- a/addons/event/wizard/event_confirm_registration.py +++ b/addons/event/wizard/event_confirm_registration.py @@ -63,7 +63,7 @@ class event_confirm_registration(osv.osv_memory): registration_pool = self.pool.get('event.registration') registration_ids = context.get('registration_ids', []) registration_pool.do_open(cr, uid, registration_ids, context=context) - return {} + return {'type': 'ir.actions.act_window_close'} event_confirm_registration() diff --git a/addons/event_project/wizard/event_project_retro.py b/addons/event_project/wizard/event_project_retro.py index ada9b7fa17b..c7eba5e0ec1 100644 --- a/addons/event_project/wizard/event_project_retro.py +++ b/addons/event_project/wizard/event_project_retro.py @@ -76,7 +76,7 @@ class event_project(osv.osv_memory): }) event_obj.write(cr, uid, [event.id], {'project_id': duplicate_project_id }) - return {} + return {'type': 'ir.actions.act_window_close'} event_project() diff --git a/addons/hr_attendance/wizard/hr_attendance_sign_in_out.py b/addons/hr_attendance/wizard/hr_attendance_sign_in_out.py index 4e079584053..ed08ee93174 100644 --- a/addons/hr_attendance/wizard/hr_attendance_sign_in_out.py +++ b/addons/hr_attendance/wizard/hr_attendance_sign_in_out.py @@ -160,7 +160,7 @@ class hr_sign_in_out(osv.osv_memory): success = self.pool.get('hr.employee').attendance_action_change(cr, uid, [emp_id], 'sign_in') except: raise osv.except_osv(_('UserError'), _('A sign-in must be right after a sign-out !')) - return {} # To do: Return Success message + return {'type': 'ir.actions.act_window_close'} # To do: Return Success message def sign_out(self, cr, uid, data, context=None): emp_id = data['emp_id'] @@ -172,7 +172,7 @@ class hr_sign_in_out(osv.osv_memory): success = self.pool.get('hr.employee').attendance_action_change(cr, uid, [emp_id], 'sign_out') except: raise osv.except_osv(_('UserError'), _('A sign-out must be right after a sign-in !')) - return {} # To do: Return Success message + return {'type': 'ir.actions.act_window_close'} # To do: Return Success message hr_sign_in_out() diff --git a/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py b/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py index 596076cf336..90c9a5d7b8c 100644 --- a/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py +++ b/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py @@ -93,7 +93,7 @@ class hr_so_project(osv.osv_memory): emp_id = data.emp_id.id emp_obj.attendance_action_change(cr, uid, [emp_id], type='sign_out', dt=data.date) self._write(cr, uid, data, emp_id, context=context) - return {} + return {'type': 'ir.actions.act_window_close'} def sign_out_result(self, cr, uid, ids, context=None): emp_obj = self.pool.get('hr.employee') @@ -101,7 +101,7 @@ class hr_so_project(osv.osv_memory): emp_id = data.emp_id.id emp_obj.attendance_action_change(cr, uid, [emp_id], type='action', dt=data.date) self._write(cr, uid, data, emp_id, context=context) - return {} + return {'type': 'ir.actions.act_window_close'} hr_so_project() @@ -157,7 +157,7 @@ class hr_si_project(osv.osv_memory): for data in self.browse(cr, uid, ids, context=context): emp_id = data.emp_id.id emp_obj.attendance_action_change(cr, uid, [emp_id], type = 'sign_in' ,dt=data.date or False) - return {} + return {'type': 'ir.actions.act_window_close'} def default_get(self, cr, uid, fields_list, context=None): res = super(hr_si_project, self).default_get(cr, uid, fields_list, context=context) diff --git a/addons/idea/wizard/idea_post_vote.py b/addons/idea/wizard/idea_post_vote.py index 712f84d4053..b54c007549d 100644 --- a/addons/idea/wizard/idea_post_vote.py +++ b/addons/idea/wizard/idea_post_vote.py @@ -126,7 +126,7 @@ class idea_post_vote(osv.osv_memory): idea_pool._vote_save(cr, uid, vote_id, None, score, context) #vote = vote_pool.create(cr, uid, vote) - return {} + return {'type': 'ir.actions.act_window_close'} idea_post_vote() diff --git a/addons/l10n_ch/wizard/bvr_import.py b/addons/l10n_ch/wizard/bvr_import.py index 26630bbdd53..3be42db982f 100644 --- a/addons/l10n_ch/wizard/bvr_import.py +++ b/addons/l10n_ch/wizard/bvr_import.py @@ -256,7 +256,7 @@ class bvr_import_wizard(osv.osv_memory): if res: data['form']['file'] = res['file'] _import(self, cr, uid, data, context=context) - return {} + return {'type': 'ir.actions.act_window_close'} bvr_import_wizard()