Skip to Content
Menu
This question has been flagged
3 Replies
2929 Views

like this message 


The requested operation cannot be completed due to security restrictions. Please contact your system administrator.

(Document type: Budget Transfers, Operation: write)

it is show when user have no access like (write)  and want write in some record 

Avatar
Discard
Author

a warning in CORE odoo module so i cant fined the main class to inherit it ...

Author Best Answer

a warning in CORE odoo module so i cant fined the main class to inherit it ...

Avatar
Discard
Best Answer

Abdoreem,

Odoo is such a great framework where the existing modules are a great teacher for you.

If you want to have a warning on write, you can plan to add a constraint and that constraint upon failure, can show such a message. See the example in addons/product/models/product.py Line 40 onwards.

If you want to translate that message, you have to make sure to use _ in the message provided that you import the _ class. Afterwards, make a .po file Or use Odoo utility to export translations and import it back after corrections.

Thanks.

Avatar
Discard