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

Hello 

i create custom report that user can print and after signature will upload it and change state of the object to (new -->  waiting) so i want to restrict remove of that attachment from my form in the state (waiting)

N.B: i don't want create button for print just use print in odoo

thank you in advance

아바타
취소

Hey,

Inherit ir.attachemnt model and then call unlink function.

Inside this function, you browse with the res_id ( integer that represents the id of your model's record ). Then check its state.

If waiting, raise Error.

Hope this helps.

작성자 베스트 답변

thanks brahim

아바타
취소
관련 게시물 답글 화면 활동
2
5월 21
7365
0
9월 24
1511
1
12월 18
2704
2
10월 18
7538
0
3월 18
3593