Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
5205 Переглядів

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

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
No close wizard report Вирішено
2
трав. 21
7366
0
вер. 24
1517
1
груд. 18
2707
2
жовт. 18
7541
0
бер. 18
3613