mirror of
https://github.com/bringout/oca-hr.git
synced 2026-04-23 23:32:07 +02:00
Move all OCA HR modules from oca-technical to dedicated oca-hr submodule
Reorganized 67 HR-related modules for better structure: - Moved all odoo-bringout-oca-hr-* packages from packages/oca-technical/ - Now organized in dedicated packages/oca-hr/ submodule - Includes attendance, expense, holiday, employee, and contract modules - Maintains all module functionality while improving project organization This creates a cleaner separation between general technical modules and HR-specific functionality. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
f672249949
commit
dfcda4100c
2456 changed files with 120722 additions and 0 deletions
|
|
@ -0,0 +1,3 @@
|
|||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from . import test_hr_employee_relatives
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
# Copyright (C) 2018 Brainbean Apps (https://brainbeanapps.com)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
from dateutil.relativedelta import relativedelta
|
||||
|
||||
from odoo.tests import Form, common
|
||||
|
||||
|
||||
class TestHrEmployeeRelatives(common.TransactionCase):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.Employee = self.env["hr.employee"]
|
||||
self.EmployeeRelative = self.env["hr.employee.relative"]
|
||||
self.relation_sibling = self.env.ref("hr_employee_relative.relation_sibling")
|
||||
|
||||
def test_age_calculation(self):
|
||||
employee = self.Employee.create(
|
||||
{
|
||||
"name": "Employee",
|
||||
"relative_ids": [
|
||||
(
|
||||
0,
|
||||
0,
|
||||
{
|
||||
"relation_id": self.relation_sibling.id,
|
||||
"partner_id": self.env.ref("base.res_partner_1").id,
|
||||
"name": "Relative",
|
||||
"date_of_birth": datetime.now() + relativedelta(years=-42),
|
||||
},
|
||||
)
|
||||
],
|
||||
}
|
||||
)
|
||||
relative = self.EmployeeRelative.browse(employee.relative_ids[0].id)
|
||||
self.assertEqual(int(relative.age), 42)
|
||||
self.assertEqual(relative.name, "Relative")
|
||||
# onchange partner
|
||||
with Form(relative) as f:
|
||||
f.partner_id = self.env.ref("base.res_partner_2")
|
||||
f.relation_id = self.relation_sibling
|
||||
self.assertEqual(relative.name, relative.partner_id.display_name)
|
||||
Loading…
Add table
Add a link
Reference in a new issue