diff --git a/crm_department/crm_view.xml b/crm_department/crm_view.xml index 40956f9..f326d59 100755 --- a/crm_department/crm_view.xml +++ b/crm_department/crm_view.xml @@ -70,9 +70,6 @@ crm.lead - - onchange_section_id(section_id) - diff --git a/project_task_department/project_task.py b/project_task_department/project_task.py index f84e93f..7abe730 100644 --- a/project_task_department/project_task.py +++ b/project_task_department/project_task.py @@ -26,15 +26,18 @@ class Task(models.Model): department_id = fields.Many2one('hr.department', 'Department') # Using old-style api for onchange - def onchange_project(self, cr, uid, ids, proj_id=False, context=None): + def onchange_project(self, cr, uid, ids, proj_id=False): + #def onchange_project(self, cr, uid, ids, proj_id=False, context=None): """ When Project is changed: copy it's Department to the issue. """ res = super(Task, self).onchange_project( - cr, uid, ids, proj_id, context=context) + cr, uid, ids, proj_id) + #cr, uid, ids, proj_id, context=context) res.setdefault('value', {}) if proj_id: proj = self.pool.get('project.project').browse( - cr, uid, proj_id, context) + cr, uid, proj_id) + #cr, uid, proj_id, context) dept = getattr(proj, 'department_id', None) if dept: res['value'].update({'department_id': dept.id})