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

How can I achieve the following

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

You can give onchange for the task_status field and check if it's Finished, you can set the Task Finisher as the current user.

if record.task_status == 'finished':
record.task_finisher = self.env.uid


อวตาร
ละทิ้ง
ผู้เขียน

Thank you so much.

คำตอบที่ดีที่สุด

Hello

you can write onchange to update task finisher.

@api.onchange('task_status')
def onchange_stage_id(self):
    if self.task_status == 'finished':
        self.task_finisher_id = self.env.user.id if self.task_finisher_id else False

Thanks & Regards,



CandidRoot Solutions Pvt. Ltd.

Mobile: (+91) 8849036209
Email: info@candidroot.com
Skype: live:candidroot
Web: https://www.candidroot.com
Address: 1229-1230, Iconic Shyamal, Near Shyamal Cross Road, Ahmedabad, Gujarat 380015
    

อวตาร
ละทิ้ง
ผู้เขียน

Thank you so much