Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
5192 Weergaven

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
Annuleer

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.

Auteur Beste antwoord

thanks brahim

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
mei 21
7361
0
sep. 24
1507
1
dec. 18
2704
2
okt. 18
7536
0
mrt. 18
3592