[FIX] Schedule jobs even if their next time has passed.
[odoo/odoo.git] / addons / l10n_ch / payment.py
1 # -*- encoding: utf-8 -*-
2 #
3 #  payment.py
4 #  l10n_ch
5 #
6 #  Created by Nicolas Bessi based on Credric Krier contribution
7 #
8 #  Copyright (c) 2010 CamptoCamp. All rights reserved.
9 ##############################################################################
10 # WARNING: This program as such is intended to be used by professional
11 # programmers who take the whole responsability of assessing all potential
12 # consequences resulting from its eventual inadequacies and bugs
13 # End users who are looking for a ready-to-use solution with commercial
14 # garantees and support are strongly adviced to contract a Free Software
15 # Service Company
16 #
17 # This program is Free Software; you can redistribute it and/or
18 # modify it under the terms of the GNU General Public License
19 # as published by the Free Software Foundation; either version 2
20 # of the License, or (at your option) any later version.
21 #
22 # This program is distributed in the hope that it will be useful,
23 # but WITHOUT ANY WARRANTY; without even the implied warranty of
24 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25 # GNU General Public License for more details.
26 #
27 # You should have received a copy of the GNU General Public License
28 # along with this program; if not, write to the Free Software
29 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
30 #
31 ##############################################################################
32 """Override of pament order for adding a get wizard function"""
33
34 from osv import osv
35
36 class PaymentOrder(osv.osv):
37     """Override of pament order for adding a get wizard function"""
38     _inherit = 'payment.order'
39     def get_wizard(self, mode):
40         "Return the good wizard in function of the payment type"
41         if mode == 'opae':
42             #return 'l10n_ch','wizard_account_opae_create'
43             raise wizard.except_wizard(
44                                 _('Warning'),
45                                 _('Functionality is not yet stable'+
46                                 'please look at lp:openerp-swiss-localization'+
47                                 ' for latest version warning Beta version' )
48                             )
49         elif mode == 'dta':
50             return 'l10n_ch','wizard_account_dta_create'
51         else:
52             return super(PaymentOrder, self).get_wizard(mode)
53 PaymentOrder()