Odoo Book -

Add the field to the user interface by inheriting the settings form view in an XML file.

from odoo import models, api class StudentRecord(models.Model): _name = 'student.record' @api.model def create(self, vals): res = super(StudentRecord, self).create(vals) # Check the system parameter is_enabled = self.env['ir.config_parameter'].sudo().get_param('education_organization.enable_student_notifications') if is_enabled: self.send_notification_email(res) return res Use code with caution. Copied to clipboard Other Common Features for Development

: Extending the name_search() function to allow finding records by fields other than name, such as a mobile number. Odoo Book

from odoo import models, fields class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' enable_student_notifications = fields.Boolean( string="Enable Student Creation Emails", config_parameter='education_organization.enable_student_notifications' ) Use code with caution. Copied to clipboard

: Creating card-based displays for models like "Company Employees" to improve visual management. Add the field to the user interface by

Create a new Python file to inherit the res.config.settings model. This model is transient and requires special functions to save and retrieve data.

res.config.settings.view.form.inherit.edu res.config.settings Use code with caution. Copied to clipboard This model is transient and requires special functions

Below is an example of developing a , which allows users to toggle specific functionalities on or off within a custom module. Feature: Custom Configuration Toggle

Share.
Odoo Book

Joe is our resident Legend of Zelda lore expert and long time enthusiast of vintage technology going back to bricking his first PSP 1000 to repairing old audio equipment and completely building his New 3DS XL. He has been apart the handheld emulation scene since 2018 and a member of Retro Handhelds since it’s founding. He is currently a website writer and our Facebook admin. Do NOT ask him his opinion on proper screen calibration, lest ye be damned. Favorite Game: The Legend of Zelda: Wind Waker

3 Comments

Leave A Reply