1 # -*- encoding: utf-8 -*-
2 ##############################################################################
4 # OpenERP, Open Source Management Solution
5 # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
8 # This program is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
21 ##############################################################################
25 from osv import fields,osv,orm
29 from tools.translate import _
31 # here need to implement inheritance on osv_memory object. after that, it will work well.
32 class crm_menu_config_wizard(osv.osv_memory):
33 _inherit='crm.menu.config_wizard'
34 def action_create(self, cr, uid, ids, *args):
35 res=super(crm_menu_config_wizard, self).action_create(cr, uid, ids, *args)
36 for res in self.read(cr,uid,ids):
40 file_name = 'crm_'+section+'_vertical_view.xml'
42 tools.convert_xml_import(cr, 'crm_configuration', tools.file_open(os.path.join('crm_vertical',file_name )), {}, 'init', *args)
44 raise osv.except_osv(_('Error !'), str(e))
47 crm_menu_config_wizard()
48 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: