Hello
I want to create a model Category who can has many SubCategories and can be a SubCategory of more than one Category.
How I am able to do this in Odoo v8.0
This is the way I would do it. But there raise an error that i'm not able to create a relation to the same model.
class ebay_categories(models.Model):
_name = "famberg.categories"
_rec_name = 'CategoryName'
_sql_constraints = {('unique_CategoryID', 'unique(CategoryID)', 'The CategoryID needs to be unique!')}
CategoryID = fields.Char(size=10, string="Ebay Category ID")
CategoryName = fields.Char(size=30, string="Ebay Category Name")
CategoryParentIDs = fields.many2many(comodel_name="famberg..categories",inverse_name="Category", string="Parrent Categorys")