Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ

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'), )

Ảnh đại diện
Huỷ bỏ

Were you able to resolve it ? facing same issue.

Bài viết liên quan Trả lời Lượt xem Hoạt động
6
thg 8 20
7393
0
thg 4 25
1371
4
thg 5 24
12617
1
thg 5 24
2569
1
thg 4 24
2205