mirror of
https://github.com/bringout/oca-hr.git
synced 2026-04-23 06:52: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,27 @@
|
|||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class HrEmployee(models.Model):
|
||||
_inherit = "hr.employee"
|
||||
|
||||
count_courses = fields.Integer(
|
||||
"Number of courses", compute="_compute_count_courses"
|
||||
)
|
||||
|
||||
courses_ids = fields.One2many(
|
||||
"hr.course.attendee",
|
||||
"employee_id",
|
||||
string="Courses",
|
||||
readonly=True,
|
||||
)
|
||||
|
||||
@api.depends("courses_ids")
|
||||
def _compute_count_courses(self):
|
||||
for r in self:
|
||||
r.count_courses = len(r.courses_ids)
|
||||
|
||||
def action_view_course(self):
|
||||
action = self.env.ref("hr_course.action_view_course")
|
||||
result = action.read()[0]
|
||||
result["domain"] = [("employee_id", "=", self.id)]
|
||||
return result
|
||||
Loading…
Add table
Add a link
Reference in a new issue