Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
5211 Tampilan

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

Avatar
Buang

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.

Penulis Jawaban Terbai

thanks brahim

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
2
Mei 21
7371
0
Sep 24
1535
1
Des 18
2716
2
Okt 18
7549
0
Mar 18
3641