diff options
| author | Fabien Pinckaers <fp@tinyerp.com> | 2010-03-09 10:56:19 +0100 |
|---|---|---|
| committer | Fabien Pinckaers <fp@tinyerp.com> | 2010-03-09 10:56:19 +0100 |
| commit | 0129ecbcf76f5a2076ddf9278fda4e23b70b175e (patch) | |
| tree | 80e829322417131f253482fcb7908b0667b2b38d /addons/project_issue/project_issue.py | |
| parent | 33c94dc95f8bd9283864d43a15c4c8fc4c836faf (diff) | |
[IMP] project issue form
bzr revid: fp@tinyerp.com-20100309095619-r2d676mg94jhsc1u
Diffstat (limited to 'addons/project_issue/project_issue.py')
| -rw-r--r-- | addons/project_issue/project_issue.py | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index f0441c0263c..48492f44675 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -29,10 +29,8 @@ from tools.translate import _ import tools from osv import fields,osv,orm from osv.orm import except_orm - from crm import crm - class project_issue(osv.osv): _name = "project.issue" _description = "Project Issue" @@ -45,30 +43,22 @@ class project_issue(osv.osv): 'ref2' : fields.reference('Reference 2', selection=crm._links_get, size=128), 'canal_id': fields.many2one('res.partner.canal', 'Channel',help="The channels represent the different communication modes available with the customer." \ " With each commercial opportunity, you can indicate the canall which is this opportunity source."), - 'planned_revenue': fields.float('Planned Revenue'), - 'planned_cost': fields.float('Planned Costs'), - 'som': fields.many2one('res.partner.som', 'State of Mind', help="The minds states allow to define a value scale which represents" \ - "the partner mentality in relation to our services.The scale has" \ - "to be created with a factor for each level from 0 (Very dissatisfied) to 10 (Extremely satisfied)."), 'categ_id': fields.many2one('crm.case.categ','Category', domain="[('object_id.model', '=', 'crm.project.bug')]"), - 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), - 'type_id': fields.many2one('crm.case.resource.type', 'Bug Type', domain="[('object_id.model', '=', 'project.issue')]"), - + 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Severity'), + 'type_id': fields.many2one('crm.case.resource.type', 'Version', domain="[('object_id.model', '=', 'project.issue')]"), 'partner_name': fields.char("Employee's Name", size=64), 'partner_mobile': fields.char('Mobile', size=32), 'partner_phone': fields.char('Phone', size=32), 'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('object_id.model', '=', 'project.issue')]"), 'project_id':fields.many2one('project.project', 'Project'), 'duration': fields.float('Duration'), - 'probability': fields.float('Probability (%)'), 'task_id': fields.many2one('project.task', 'Task', domain="[('project_id','=',project_id)]") } - def _get_project(self, cr, uid, context): user = self.pool.get('res.users').browse(cr,uid,uid, context=context) if user.context_project_id: return user.context_project_id - return False + return False def _convert(self, cr, uid, ids, xml_id, context=None): data_obj = self.pool.get('ir.model.data') @@ -79,7 +69,7 @@ class project_issue(osv.osv): if categ_id: self.write(cr, uid, ids, {'categ_id': categ_id}) return True - + def convert_to_feature(self, cr, uid, ids, context=None): return self._convert(cr, uid, ids, 'feature_request_categ', context=context) @@ -92,14 +82,10 @@ class project_issue(osv.osv): stage = self.pool.get('crm.case.stage').browse(cr, uid, stage_id, context) if not stage.on_change: return {'value':{}} - return {'value':{'probability':stage.probability}} + return {'value':{}} _defaults = { - 'project_id':_get_project, - 'probability':lambda *a:0.0, - 'planned_cost':lambda *a:0.0, - 'planned_revenue':lambda *a:0.0, - } - + 'project_id':_get_project, + } project_issue() |
