1 # -*- coding: utf-8 -*-
2 ##############################################################################
4 # OpenERP, Open Source Management Solution
5 # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU Affero General Public License as
9 # published by the Free Software Foundation, either version 3 of the
10 # License, or (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU Affero General Public License for more details.
17 # You should have received a copy of the GNU Affero General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 ##############################################################################
22 from osv import fields,osv,orm
25 class crm_helpdesk(osv.osv):
26 _name = "crm.helpdesk"
27 _description = "Helpdesk Cases"
31 'date_closed': fields.datetime('Closed', readonly=True),
32 'date': fields.datetime('Date'),
33 'ref' : fields.reference('Reference', selection=crm._links_get, size=128),
34 'ref2' : fields.reference('Reference 2', selection=crm._links_get, size=128),
35 'canal_id': fields.many2one('res.partner.canal', 'Channel',help="The channels represent the different communication modes available with the customer." \
36 " With each commercial opportunity, you can indicate the canall which is this opportunity source."),
37 'planned_revenue': fields.float('Planned Revenue'),
38 'planned_cost': fields.float('Planned Costs'),
39 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
40 'probability': fields.float('Probability (%)'),
41 'som': fields.many2one('res.partner.som', 'State of Mind', help="The minds states allow to define a value scale which represents" \
42 "the partner mentality in relation to our services.The scale has" \
43 "to be created with a factor for each level from 0 (Very dissatisfied) to 10 (Extremely satisfied)."),
44 'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.helpdesk')]"),
45 'duration': fields.float('Duration'),