Skip to Content
Menú
This question has been flagged
2 Respostes
4976 Vistes

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
Descartar

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.

Autor Best Answer

thanks brahim

Avatar
Descartar
Related Posts Respostes Vistes Activitat
2
de maig 21
7082
0
de set. 24
1055
1
de des. 18
2387
2
d’oct. 18
7170
0
de març 18
3290