跳至內容
選單
此問題已被標幟
2 回覆
5187 瀏覽次數

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
7361
0
9月 24
1506
1
12月 18
2704
2
10月 18
7536
0
3月 18
3592