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

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
No close wizard report แก้ไขแล้ว
2
พ.ค. 21
7384
0
ก.ย. 24
1577
1
ธ.ค. 18
2732
2
ต.ค. 18
7561
0
มี.ค. 18
3671