from openerp import api, fields, models

import logging
_logger = logging.getLogger(__name__)

class event(models.Model):
    _inherit = ['calendar.event']

    categ_ids = fields.Many2one('calendar.event.type', 'Type', required=True)
    
    hex_value  = fields.Char(
        string="Color value for category",
        related="categ_ids.color",
        store=False,
        size=7
    )