跳至内容
菜单
此问题已终结
2 回复
4887 查看

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

形象
丢弃
相关帖文 回复 查看 活动
2
5月 21
6986
0
9月 24
893
1
12月 18
2298
2
10月 18
7070
0
3月 18
3169