From ddfcd4042362d651b7b3f10c3417809fa1751a96 Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Wed, 17 Feb 2010 14:19:38 +0530 Subject: [PATCH] [IMP] department_id added in expense,timesheet,applicant,holidays. Department view put in comment in resource and set in hr bzr revid: vir@tinyerp.com-20100217084938-wb9ixv8ey4ah6j9i --- addons/crm_hr/crm_hr.py | 15 +++++------ addons/crm_hr/crm_hr_view.xml | 25 ++++++++++--------- addons/hr/hr_department_view.xml | 16 ++++++++++++ addons/hr_holidays/hr.py | 8 +++--- addons/hr_holidays/hr_view.xml | 4 +++ .../hr_timesheet_sheet/hr_timesheet_sheet.py | 1 + .../hr_timesheet_sheet_view.xml | 3 +++ addons/resource/hr_department_view.xml | 4 +-- 8 files changed, 52 insertions(+), 24 deletions(-) diff --git a/addons/crm_hr/crm_hr.py b/addons/crm_hr/crm_hr.py index b122cc6b9e9..2abed71561f 100644 --- a/addons/crm_hr/crm_hr.py +++ b/addons/crm_hr/crm_hr.py @@ -26,18 +26,18 @@ class crm_job(osv.osv): _name = "crm.job" _description = "Job Cases" _order = "id desc" - _inherit ='crm.case' - _columns = { + _inherit ='crm.case' + _columns = { 'date_closed': fields.datetime('Closed', readonly=True), - 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), + 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), 'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.job')]"), 'planned_revenue': fields.float('Planned Revenue'), 'planned_cost': fields.float('Planned Costs'), - 'probability': fields.float('Probability (%)'), + 'probability': fields.float('Probability (%)'), 'partner_name': fields.char("Employee's Name", size=64), 'partner_name2': fields.char('Employee Email', size=64), 'partner_phone': fields.char('Phone', size=32), - 'partner_mobile': fields.char('Mobile', size=32), + 'partner_mobile': fields.char('Mobile', size=32), 'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.job')]"), 'type_id': fields.many2one('crm.case.resource.type', 'Type Name', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.job')]"), 'duration': fields.float('Duration'), @@ -49,7 +49,8 @@ class crm_job(osv.osv): '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)."), - 'phonecall_id':fields.many2one ('crm.phonecall', 'Phonecall'), + 'phonecall_id':fields.many2one ('crm.phonecall', 'Phonecall'), + 'department_id':fields.many2one('hr.department','Department'), } - + crm_job() diff --git a/addons/crm_hr/crm_hr_view.xml b/addons/crm_hr/crm_hr_view.xml index 9771a25309c..41f31883d18 100644 --- a/addons/crm_hr/crm_hr_view.xml +++ b/addons/crm_hr/crm_hr_view.xml @@ -1,7 +1,7 @@ - + # ------------------------------------------------------ # Job Categories # ------------------------------------------------------ @@ -10,20 +10,20 @@ Job Categories crm.case.categ form - + [('object_id.model', '=', 'crm.claim')] - {'object_id':'crm.job'} + {'object_id':'crm.job'} - # ------------------------------------------------------ + # ------------------------------------------------------ # Stage - # ------------------------------------------------------ + # ------------------------------------------------------ Job Stages crm.case.stage form [('object_id.model', '=', 'crm.claim')] - {'object_id':'crm.job'} + {'object_id':'crm.job'} # ------------------------------------------------------ @@ -38,6 +38,7 @@ + @@ -48,9 +49,9 @@