I’m working on a model in Cyllo and I need to reuse a function that’s already defined in a different model. What’s the best way to call or import that function so I can use it inside my model?
Welcome!
Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.
This question has been flagged
1
Reply
9
Views
Here's how you can inherit from existing models in Odoo to add functionality to your custom model. This example shows a simple way to leverage Odoo's built-in features. class CustomModel(models.Model): _name = 'custom.model' _inherit = 'mail.thread' # Inherits chatter and message tracking name = fields.Char(string='Name')