mirror of
https://github.com/bringout/oca-hr.git
synced 2026-04-26 17:12:02 +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,2 @@
|
|||
from . import hr_job
|
||||
from . import hr_contract
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
from odoo import models
|
||||
|
||||
|
||||
class HrContract(models.Model):
|
||||
_inherit = "hr.contract"
|
||||
|
||||
def write(self, vals):
|
||||
res = super().write(vals)
|
||||
if "state" in vals:
|
||||
job_obj = self.job_id
|
||||
job_obj._compute_to_recruit()
|
||||
return res
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class HrJob(models.Model):
|
||||
_inherit = "hr.job"
|
||||
|
||||
@api.depends("no_of_recruitment")
|
||||
def _compute_to_recruit(self):
|
||||
contract_obj = self.env["hr.contract"]
|
||||
for rec in self:
|
||||
rec.to_recruit = rec.no_of_recruitment - contract_obj.search_count(
|
||||
[("job_id", "=", rec.id), ("state", "=", "open")]
|
||||
)
|
||||
if rec.to_recruit > 0:
|
||||
rec.website_published = True
|
||||
else:
|
||||
rec.website_published = False
|
||||
|
||||
to_recruit = fields.Integer(
|
||||
string="To be recruited", compute="_compute_to_recruit", store=True
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue