Welcome!

Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

Sign up

You need to be registered to interact with the community.
This question has been flagged
1 Reply
9 Views

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?

Avatar
Discard

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')

Avatar
Discard

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!