From 052bff103d937d307e2eb44dcef36a79d4ea6a88 Mon Sep 17 00:00:00 2001 From: yustas147 Date: Thu, 2 Feb 2017 14:56:36 +0200 Subject: [PATCH 1/2] [PATCH] [FIX] Removing on_change_section_id from view --- crm_department/crm_view.xml | 3 --- 1 file changed, 3 deletions(-) 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) - From de62e6320392a08cce97ec97e13cf095b6efebc9 Mon Sep 17 00:00:00 2001 From: yustas147 Date: Fri, 3 Feb 2017 15:25:26 +0200 Subject: [PATCH 2/2] [FIX] context in onchange_project error --- project_task_department/project_task.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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})