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

Hi,

I nee to make a record as readonly .That means,I have my attendace and also have timesheets,

If my attendance is zero,I need to make that day's timesheet as readonly and show as absent

How could I do this?

Please help


Thanks in advance

아바타
취소
베스트 답변

1) You can create a custom constraint on timesheet object. The constraint will check your attendance for the date selected in the timesheet and the employee and if there no attendance, raise an exception like "You cannot fill the timesheet for the absent day".

2) Create a compute boolean field (Is Absent) in timesheet object. Check for the attendance of the day for the user/employee and if it is absent, set True in the field. Now, based on this boolean field, add attrs in the timesheet line in xml and make it readonly if Absent is True.


아바타
취소
작성자

Thanks for this,and I'll try it

베스트 답변

Hi Veni,

I hope it will help for you..

<field name="fieldname" readonly="1">

<tree>

inside your tree fields here....

</tree>

</field>


Thank You.

아바타
취소

<field name="fieldname" attrs="{'readonly':[('state', '=', "done")]}">

<tree>

inside your tree fields here....

</tree>

</field>

작성자

I think you couldn't understand my problem.

Suppose I have a new timesheet and I didn't fill it, What I need is,I have to check my attendance If it is zero then check with the corresponding date and create a record with the date and mark it as absent.This is my problem

관련 게시물 답글 화면 활동
1
6월 25
2225
1
1월 22
18660
3
7월 19
5521
4
11월 20
8008
1
8월 20
4017