Hey Cyllo folks, what are the different types of models in Cyllo and how can i set up a new model? Any tips for newbies?
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
Here's how you'd typically structure a response to a question about Odoo models, incorporating a brief introduction before presenting the code: That's a great question! Here's an example of an Odoo model defining product categories, demonstrating the use of fields and relationships. from odoo import api, fields, models class ProductCategory(models.Model): _name = 'product.category' _description = 'Product Category' _rec_name = 'name' name = fields.Char(string='Category Name', required=True) description = fields.Text(string='Description') active = fields.Boolean(string='Active', default=True) parent_id = fields.Many2one('product.category', string='Parent Category') child_ids = fields.One2many('product.category', 'parent_id', string='Child Categories')