employee_id = self.env['hr.employee.ref'].sudo().search([('employees_id.id', '=', self.employees_id.id)])
if employee_id:
for emp in employee_id:
if not emp.end_date:
action = self.env.ref('project.open_view_project_all').read()[0]
action['domain'] = [('id', '=', emp.project_id.id)]
# print(action['domain'])
msg = (_('You cant add %s in this Project ,He/She is already busy with Project : %s,Please go back to the Project %s and add the End date ') % (
self.employees_id.name, emp.project_id.name, emp.project_id.name))
raise RedirectWarning(msg, action['id'], _('VIEW PROJECT'), )
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
2785
查看
相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
6
8月 20
|
7407 | ||
|
0
4月 25
|
1380 | ||
|
4
5月 24
|
12623 | ||
|
1
5月 24
|
2581 | ||
|
1
4月 24
|
2210 |
Were you able to resolve it ? facing same issue.