Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
5212 Visualizzazioni

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
Abbandona

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.

Autore Risposta migliore

thanks brahim

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
mag 21
7373
0
set 24
1537
1
dic 18
2718
2
ott 18
7550
0
mar 18
3646