Refactor resource calendar and resource mixin: - add a required timezone field on models 'resource.calendar' and 'resource.resource'; - resource calendar attendances are now computed in the timezone of the resource or the calendar; - improve API of 'resource.calendar' and 'resource.mixin'; - avoid other modules from using the implementation methods of 'resource.calendar'; - refactor implementation of 'resource.calendar' to make it more efficient.
13 lines
297 B
Python
13 lines
297 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import fields, models
|
|
|
|
|
|
class ResourceTest(models.Model):
|
|
_description = 'Test Resource Model'
|
|
_name = 'resource.test'
|
|
_inherit = ['resource.mixin']
|
|
|
|
name = fields.Char()
|