Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2767 มุมมอง

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

อวตาร
ละทิ้ง

Were you able to resolve it ? facing same issue.

Related Posts ตอบกลับ มุมมอง กิจกรรม
display list of product based on domain แก้ไขแล้ว
6
ส.ค. 20
7387
0
เม.ย. 25
1370
4
พ.ค. 24
12611
1
พ.ค. 24
2566
1
เม.ย. 24
2198