1 # -*- encoding: utf-8 -*-
2 ##############################################################################
4 # Copyright (c) 2004-2008 TINY SPRL. (http://tiny.be) All Rights Reserved.
8 # WARNING: This program as such is intended to be used by professional
9 # programmers who take the whole responsability of assessing all potential
10 # consequences resulting from its eventual inadequacies and bugs
11 # End users who are looking for a ready-to-use solution with commercial
12 # garantees and support are strongly adviced to contract a Free Software
15 # This program is Free Software; you can redistribute it and/or
16 # modify it under the terms of the GNU General Public License
17 # as published by the Free Software Foundation; either version 2
18 # of the License, or (at your option) any later version.
20 # This program is distributed in the hope that it will be useful,
21 # but WITHOUT ANY WARRANTY; without even the implied warranty of
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 # GNU General Public License for more details.
25 # You should have received a copy of the GNU General Public License
26 # along with this program; if not, write to the Free Software
27 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 ##############################################################################
33 from osv import fields,osv,orm
39 # ('draft','Unreviewed'),
41 # ('cancel', 'Refuse Bug'),
43 # ('pending','Pending')
45 class crm_case_category2(osv.osv):
46 _name = "crm.case.category2"
47 _description = "Category2 of case"
50 'name': fields.char('Case Category2 Name', size=64, required=True),
51 'section_id': fields.many2one('crm.case.section', 'Case Section'),
55 class crm_case_stage(osv.osv):
56 _name = "crm.case.stage"
57 _description = "Stage of case"
60 'name': fields.char('Stage Name', size=64, required=True),
61 'section_id': fields.many2one('crm.case.section', 'Case Section'),
65 class crm_cases(osv.osv):
69 'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('section_id','=',section_id)]"),
70 'category2_id': fields.many2one('crm.case.category2','Category Name', domain="[('section_id','=',section_id)]"),
71 'duration': fields.float('Duration'),
72 'note': fields.text('Note'),
73 'partner_name': fields.char('Employee Name', size=64),
74 'partner_name2': fields.char('Employee Email', size=64),
75 'partner_phone': fields.char('Phone', size=16),
76 'partner_mobile': fields.char('Mobile', size=16),
81 class crm_menu_config_wizard(osv.osv_memory):
82 _name='crm.menu.config_wizard'
84 'name':fields.char('Name', size=64),
85 'meeting' : fields.boolean('Calendar of Meetings', help="Manages the calendar of meetings of the users."),
86 'lead' : fields.boolean('Leads', help="Allows you to track and manage leads which are pre-sales requests, the very first contact with a customer request."),
87 'opportunity' : fields.boolean('Business Opportunities', help="Tracks identified business opportunities for your sales pipeline."),
88 'jobs' : fields.boolean('Jobs Hiring Process', help="Help you to organise the jobs hiring process: evaluation, meetings, email integration..."),
89 'board_document':fields.boolean('Document Management', help= "The Document Management System of Open ERP allows you to store, browse, automatically index, search and preview all kind of documents (internal documents, printed reports, calendar system). It opens an FTP access for the users to easily browse association's document."),
90 'bugs' : fields.boolean('Bug Tracking', help="Used by companies to track bugs and support requests on softwares"),
91 'fund' : fields.boolean('Fund Raising Operations', help="This may help associations in their fund raising process and tracking."),
92 'helpdesk' : fields.boolean('Help Desk Operations', help="This may help your Help Desk."),
95 'meeting': lambda *args: True,
96 'jobs': lambda *args: True,
97 'opportunity': lambda *args: True,
99 def action_create(self, cr, uid, ids, *args):
100 for res in self.read(cr,uid,ids):
101 res.__delitem__('id')
105 file_name = 'crm_'+section+'_menu.xml'
107 tools.convert_xml_import(cr, 'crm_configuration', tools.file_open(os.path.join('crm_configuration',file_name )), {}, 'init', *args)
109 raise osv.except_osv('Error !', e)
114 'res_model': 'ir.actions.configuration.wizard',
115 'type': 'ir.actions.act_window',
118 def action_cancel(self,cr,uid,ids,conect=None):
122 'res_model': 'ir.actions.configuration.wizard',
123 'type': 'ir.actions.act_window',
127 crm_menu_config_wizard()
129 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: