def __init__(self,
                 model,
                 view,
                 ids=None,
                 domain=[],
                 context={},
                 options=None):
        TinyCalendar.__init__(self, model, ids, view, domain, context, options)

        y, m, d = time.localtime()[:3]
        if options:
            y, m, d = options.date1[:3]

        self.day = Day(y, m, d)

        self.events = self.get_events([self.day])

        minical = MiniCalendar(self.day)
        groupbox = GroupBox(self.colors,
                            self.color_values,
                            self.day,
                            group_relation=self.fields[self.color_field],
                            title=(self.color_field or None)
                            and self.fields[self.color_field]['string'],
                            mode='day')

        self.sidebar = Sidebar(minical, groupbox, self.use_search)
    def __init__(self,
                 model,
                 view,
                 ids=None,
                 domain=[],
                 context={},
                 options=None):
        TinyCalendar.__init__(self, model, ids, view, domain, context, options)

        y, m, d = time.localtime()[:3]
        if options:
            y, m, d = options.date1[:3]

        self.week = Week(Day(y, m, d))
        self.events = self.get_events(self.week.days)

        self.selected_day = _get_selection_day(Day(y, m, d), self.selected_day,
                                               'week')

        minical = MiniCalendar(self.week[0], True)
        groupbox = GroupBox(self.colors,
                            self.color_values,
                            self.week[0],
                            group_relation=self.fields[self.color_field],
                            title=(self.color_field or None)
                            and self.fields[self.color_field]['string'],
                            mode='week')

        self.sidebar = Sidebar(minical, groupbox, self.use_search)
    def __init__(self,
                 model,
                 view,
                 ids=None,
                 domain=[],
                 context={},
                 options=None):

        TinyCalendar.__init__(self, model, ids, view, domain, context, options)

        y, m = time.localtime()[:2]
        if options:
            y = options.year
            m = options.month

        self.month = Month(y, m)
        self.events = self.get_events(self.month.days)

        self.selected_day = _get_selection_day(Day(y, m, 1), self.selected_day,
                                               'month')

        minical = MiniCalendar(self.selected_day)
        groupbox = GroupBox(self.colors,
                            self.color_values,
                            self.selected_day,
                            group_relation=self.fields[self.color_field],
                            title=(self.color_field or None)
                            and self.fields[self.color_field]['string'],
                            mode='month')

        self.sidebar = Sidebar(minical, groupbox, self.use_search)
    def __init__(self, model, view, ids=None, domain=[], context={}, options=None):
        TinyCalendar.__init__(self, model, ids, view, domain, context, options)

        y, m, d = time.localtime()[:3]
        if options:
            y, m, d = options.date1[:3]

        self.day = Day(y,m,d)

        self.events = self.get_events([self.day])

        minical = MiniCalendar(self.day)
        groupbox =  GroupBox(self.colors, self.color_values, self.day,
                group_relation=self.fields[self.color_field],
                title=(self.color_field or None) and self.fields[self.color_field]['string'],
                mode='day')

        self.sidebar = Sidebar(minical, groupbox, self.use_search)
    def __init__(self, model, view, ids=None, domain=[], context={}, options=None):
        TinyCalendar.__init__(self, model, ids, view, domain, context, options)

        y, m, d = time.localtime()[:3]
        if options:
            y, m, d = options.date1[:3]

        self.week = Week(Day(y, m, d))
        self.events = self.get_events(self.week.days)

        self.selected_day = _get_selection_day(Day(y, m, d), self.selected_day, 'week')

        minical = MiniCalendar(self.week[0], True)
        groupbox = GroupBox(self.colors, self.color_values, self.week[0],
                group_relation=self.fields[self.color_field],
                title=(self.color_field or None) and self.fields[self.color_field]['string'],
                mode='week')

        self.sidebar = Sidebar(minical, groupbox, self.use_search)
    def __init__(self, model, view, ids=None, domain=[], context={}, options=None):

        TinyCalendar.__init__(self, model, ids, view, domain, context, options)

        y, m = time.localtime()[:2]
        if options:
            y = options.year
            m = options.month

        self.month = Month(y, m)
        self.events = self.get_events(self.month.days)

        self.selected_day = _get_selection_day(Day(y, m, 1), self.selected_day, 'month')

        minical = MiniCalendar(self.selected_day)
        groupbox = GroupBox(self.colors, self.color_values, self.selected_day,
                group_relation=self.fields[self.color_field],
                title=(self.color_field or None) and self.fields[self.color_field]['string'],
                mode='month')

        self.sidebar = Sidebar(minical, groupbox, self.use_search)