콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
831 화면

I need an python function to select all task which are in open stage how can I do that using python code I am using odoo16

아바타
취소
베스트 답변

Hi,

You can get all the tasks that are in the open state by using the following Python code 
open_tasks = self.env['project.task'].search([('stage_id.id', '=', 'open_stage_id' )])

In the above code change the value of open_stage_id with the corresponding id of the stage where the task is in open.

Hope it helps

아바타
취소
관련 게시물 답글 화면 활동
3
8월 25
2613
1
5월 25
2646
1
4월 25
3637
1
4월 25
4492
1
4월 25
1963