1
0
forked from Mapan/odoo17e
odoo17e-kedaikipas58/addons/planning/tests/test_ui_common.py
2024-12-10 09:04:09 +07:00

27 lines
856 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from datetime import datetime
from dateutil.relativedelta import relativedelta
from dateutil.rrule import MO
from odoo.tests import HttpCase
class TestUiCommon(HttpCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.employee_thibault = cls.env['hr.employee'].create({
'name': 'Aaron',
'work_email': 'aaron@a.be',
'tz': 'UTC',
'employee_type': 'freelance',
'resource_calendar_id': False,
})
start = datetime.now() + relativedelta(weekday=MO(-1), hour=10, minute=0, second=0, microsecond=0)
cls.env['planning.slot'].create({
'start_datetime': start,
'end_datetime': start + relativedelta(hour=11),
})