Odoo 12 Development Cookbook - Third Edition
by Parth Gajjar, Alexandre Fayolle, Holger Brunn, Daniel Reis
How it works...
In Odoo, all settings options are added in the res.config.settings model. res.config.settings is a transient model. In step 1, we created a new security group. We will use this group to create the hide and show buttons.
In step 2, we added a new Boolean field in the res.config.settings model by inheriting it. We added an implied_group attribute with the value of my_library.group_self_borrow. This group will be assigned to all odoo users when the admin enables or disables options with the Boolean field.
Odoo settings use a form view to display settings options on a user interface. All of these options are added in a single form view with the external ID, base.res_config_settings_view_form. In step 3, we added our option in ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access