[Fix] stock_planning: Fix the problem of department_user

bzr revid: sbh@tinyerp.com-20100621140624-dogb0z6rdwd84gj4
This commit is contained in:
sbh (Open ERP) 2010-06-21 19:36:24 +05:30
parent 26d0a0d6ee
commit de589d0d73
2 changed files with 1 additions and 2 deletions

View File

@ -412,7 +412,7 @@ class stock_sale_forecast(osv.osv):
dept_id = obj.analyzed_dept_id.id and [obj.analyzed_dept_id.id] or []
dept_ids = dept_obj.search(cr,uid,[('parent_id','child_of',dept_id)])
dept_ids_set = ','.join(map(str,dept_ids))
cr.execute("SELECT user_id FROM hr_department_user_rel WHERE (department_id IN %s)" %(tuple(dept_ids_set),))
cr.execute("SELECT user_id FROM hr_department_user_rel WHERE (department_id IN (%s))" %(dept_ids_set,))
dept_users = [x for x, in cr.fetchall()]
dept_users_set = ','.join(map(str,dept_users))
else:

View File

@ -161,7 +161,6 @@
<label string = "Per User :"/>
<label string = "Per Department :"/>
<label string = "Per Warehouse :"/>
<label string = "Per Company :"/>
<label string = "Periods :"/>
<field name="analyzed_user_id" nolabel = "1" domain = "[('company_id','=',company_id)] "/>
<field name="analyzed_dept_id" nolabel = "1" domain = "[('company_id','=',company_id)] " />