Hello,
I am building a module containing a custom paperformat and external layout for a company.
I created a paperformat record my_module.my_paperformat and an external layout template my_module.my_external_layout in the module. They can be selected in the settings panel and work just fine.
I) I want them to "auto-install" when the module is being installed. This means that I want to assign my custom record/ template to the fields paperformat_id and external_layout_id in res.config.settings. How can I achieve this? I tried to use a post_init_hook function, but I somehow can not make it work.
II) How can I define that the fields of res.config.settings can not be modified by users anymore? The goal is that no system administrator can accidentally change these settings and thus destroy all documents and reports which are automatically created.
Thank you for your great help,
Markus
I am using Odoo 14 Enterprise