mirror of
https://github.com/bringout/oca-hr.git
synced 2026-04-26 07:32:05 +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 @@
|
|||
from . import test_hr_recruitment_torecruit
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
from odoo import fields
|
||||
|
||||
from odoo.addons.base.tests.common import BaseCommon
|
||||
|
||||
|
||||
class TestHRJobPostionPublish(BaseCommon):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.calendar = cls.env.ref("resource.resource_calendar_std")
|
||||
cls.job = cls.env["hr.job"].create(
|
||||
{
|
||||
"name": "Test Job",
|
||||
"no_of_recruitment": 3,
|
||||
"website_published": True,
|
||||
}
|
||||
)
|
||||
cls.employee_1 = cls.env["hr.employee"].create(
|
||||
{"name": "Test employee 1", "job_id": cls.job.id}
|
||||
)
|
||||
cls.employee_2 = cls.env["hr.employee"].create(
|
||||
{"name": "Test employee 2", "job_id": cls.job.id}
|
||||
)
|
||||
cls.employee_3 = cls.env["hr.employee"].create(
|
||||
{"name": "Test employee 3", "job_id": cls.job.id}
|
||||
)
|
||||
|
||||
cls.contract_1 = cls.env["hr.contract"].create(
|
||||
{
|
||||
"name": "Test employee 1",
|
||||
"employee_id": cls.employee_1.id,
|
||||
"resource_calendar_id": cls.calendar.id,
|
||||
"date_start": fields.date.today(),
|
||||
"job_id": cls.job.id,
|
||||
"wage": 100,
|
||||
}
|
||||
)
|
||||
cls.contract_2 = cls.env["hr.contract"].create(
|
||||
{
|
||||
"name": "Test employee 2",
|
||||
"employee_id": cls.employee_2.id,
|
||||
"resource_calendar_id": cls.calendar.id,
|
||||
"date_start": fields.date.today(),
|
||||
"job_id": cls.job.id,
|
||||
"wage": 100,
|
||||
}
|
||||
)
|
||||
cls.contract_3 = cls.env["hr.contract"].create(
|
||||
{
|
||||
"name": "Test employee 3",
|
||||
"employee_id": cls.employee_3.id,
|
||||
"resource_calendar_id": cls.calendar.id,
|
||||
"date_start": fields.date.today(),
|
||||
"job_id": cls.job.id,
|
||||
"wage": 100,
|
||||
}
|
||||
)
|
||||
|
||||
def test_job_postion_published(self):
|
||||
self.assertTrue(self.job.website_published)
|
||||
self.assertEqual(self.job.to_recruit, self.job.no_of_recruitment)
|
||||
self.contract_1.state = "open"
|
||||
self.contract_2.state = "open"
|
||||
self.contract_3.state = "open"
|
||||
self.job._compute_to_recruit()
|
||||
self.assertEqual(self.job.to_recruit, 0)
|
||||
self.assertFalse(self.job.website_published)
|
||||
self.contract_3.unlink()
|
||||
self.job._compute_to_recruit()
|
||||
self.assertEqual(self.job.to_recruit, 1)
|
||||
self.assertTrue(self.job.website_published)
|
||||
Loading…
Add table
Add a link
Reference in a new issue