diff --git a/yuthon_catering/models/yuthon_catering.py b/yuthon_catering/models/yuthon_catering.py
index c1764ccd8..3befbed8c 100644
--- a/yuthon_catering/models/yuthon_catering.py
+++ b/yuthon_catering/models/yuthon_catering.py
@@ -7,6 +7,7 @@ class YuthonCatering(models.Model):
_name = 'yuthon.catering'
date = fields.Date(string='日期', required=True)
+ employee_number = fields.Char(string='序号', related='employee_id.user_number', store=True)
week_day = fields.Char(string='星期', compute='_compute_week_day', store=True)
dept_id = fields.Many2one(string='部门', comodel_name='hr.department', related='employee_id.department_id', store=True)
employee_id = fields.Many2one(string='员工', comodel_name='hr.employee', required=True)
@@ -447,14 +448,12 @@ class YuthonCatering(models.Model):
conf = self.env['yuthon.catering.conf'].search([], limit=1)
if not conf or not conf.employee_ids:
return
-
employee_ids = conf.employee_ids
target_months = [
(2025, 12),
(2026, 1),
(2026, 2),
]
-
all_dates = []
for y, m in target_months:
d = date_cls(y, m, 1)
diff --git a/yuthon_catering/views/yuthon_catering.xml b/yuthon_catering/views/yuthon_catering.xml
index 1bd31618f..95dd0a707 100644
--- a/yuthon_catering/views/yuthon_catering.xml
+++ b/yuthon_catering/views/yuthon_catering.xml
@@ -6,7 +6,7 @@
yuthon.catering.tree
yuthon.catering
-
+
+
diff --git a/yuthon_holiday/models/inherit_hr_leave.py b/yuthon_holiday/models/inherit_hr_leave.py
index 0a3ae32cc..de7a2904f 100644
--- a/yuthon_holiday/models/inherit_hr_leave.py
+++ b/yuthon_holiday/models/inherit_hr_leave.py
@@ -18,6 +18,7 @@ class HrLeave(models.Model):
_inherit = 'hr.leave'
number_of_days = fields.Float(string='天数', digits=(16, 3))
+
def _check_validity(self):
sorted_leaves = defaultdict(lambda: self.env['hr.leave'])
for leave in self:
diff --git a/yuthon_hr_attendance/models/yuthon_holiday_statement.py b/yuthon_hr_attendance/models/yuthon_holiday_statement.py
index 554d70a21..172c212e0 100644
--- a/yuthon_hr_attendance/models/yuthon_holiday_statement.py
+++ b/yuthon_hr_attendance/models/yuthon_holiday_statement.py
@@ -13,6 +13,7 @@ class InheritHrLeave(models.Model):
_description = '请假情况'
caption = fields.Char(string="标题", compute="_compute_application_reason")
+ employee_number = fields.Char(string='序号', related='employee_id.user_number', store=True)
employee_id = fields.Many2one('hr.employee', string="发起人")
mobile_phone = fields.Char(related='employee_id.mobile_phone', string="手机号")
entry_date = fields.Date(related='employee_id.entry_date', string="入职时间", store=True)
diff --git a/yuthon_hr_attendance/models/yuthon_meal_line.py b/yuthon_hr_attendance/models/yuthon_meal_line.py
index a6d7dfa74..684c3b9f6 100644
--- a/yuthon_hr_attendance/models/yuthon_meal_line.py
+++ b/yuthon_hr_attendance/models/yuthon_meal_line.py
@@ -10,6 +10,7 @@ class YuthonMealLine(models.Model):
_description = '误餐明细'
employee_id = fields.Many2one('hr.employee', string="员工")
+ employee_number = fields.Char(string='序号', related='employee_id.user_number', store=True)
meal_name = fields.Char(string='标题')
meal_id = fields.Many2one('vacation.meal.line', string="关联误餐额度记录")
entry_date = fields.Date(related='employee_id.entry_date', string="入职时间", store=True)
diff --git a/yuthon_hr_attendance/models/yuthon_overtime_line.py b/yuthon_hr_attendance/models/yuthon_overtime_line.py
index fd0b1643b..08e9bbd5b 100644
--- a/yuthon_hr_attendance/models/yuthon_overtime_line.py
+++ b/yuthon_hr_attendance/models/yuthon_overtime_line.py
@@ -11,6 +11,7 @@ class YuthonOvertimeLine(models.Model):
employee_id = fields.Many2one('hr.employee', string="员工")
entry_date = fields.Date(related='employee_id.entry_date', string="入职时间", store=True)
+ employee_number = fields.Char(string='序号', related='employee_id.user_number', store=True)
select_month = fields.Selection([('1', '一月'), ('2', '二月'), ('3', '三月'), ('4', '四月'),
('5', '五月'), ('6', '六月'), ('7', '七月'), ('8', '八月'),
('9', '九月'), ('10', '十月'), ('11', '十一月'),
diff --git a/yuthon_hr_attendance/models/yuthon_vacation_reports.py b/yuthon_hr_attendance/models/yuthon_vacation_reports.py
index 5b5344181..f8c63b17a 100644
--- a/yuthon_hr_attendance/models/yuthon_vacation_reports.py
+++ b/yuthon_hr_attendance/models/yuthon_vacation_reports.py
@@ -21,6 +21,7 @@ class YuthonVacationReports(models.Model):
month_id = fields.Many2one('base.month', string='月份', compute="_compute_display_date", store=True)
year_id = fields.Many2one('base.year', string='年份', compute="_compute_display_date", store=True)
employee_id = fields.Many2one('hr.employee', string='员工')
+ employee_number = fields.Char(string='序号', related='employee_id.user_number', store=True, readonly=True)
entry_date = fields.Date(related='employee_id.entry_date', string="入职时间", store=True)
number_card = fields.Integer(string='补卡次数', compute="_compute_number_card")
remaining_number_card = fields.Integer(string='剩余补卡次数', default=3, compute="_compute_number_card", store=True)
@@ -2510,6 +2511,7 @@ class VacationOverline(models.Model):
default=lambda self: str(datetime.now().year))
vacation_id = fields.Many2one('yuthon.vacation.reports', string='关联假期额度记录')
employee_id = fields.Many2one('hr.employee', string='员工', compute='_compute_employee_id', store=True)
+ employee_number = fields.Char(string='序号', related='employee_id.user_number', store=True)
entry_date = fields.Date(related='employee_id.entry_date', string="入职时间", store=True)
department_id = fields.Many2one('hr.department', related='employee_id.department_id', string="部门")
company_id = fields.Many2one('res.company', related='employee_id.company_id', string="公司")
@@ -2872,6 +2874,7 @@ class VacationMealLine(models.Model):
vacation_id = fields.Many2one('yuthon.vacation.reports', string='关联假期额度记录')
is_filing = fields.Boolean(string="归档")
+ employee_number = fields.Char(string='序号', related='employee_id.user_number', store=True)
employee_id = fields.Many2one('hr.employee', string='员工', compute='_compute_employee_id', store=True)
entry_date = fields.Date(related='employee_id.entry_date', string="入职时间", store=True)
department_id = fields.Many2one('hr.department', related='employee_id.department_id', string="部门", store=True)
diff --git a/yuthon_hr_attendance/views/yuthon_holiday_statement.xml b/yuthon_hr_attendance/views/yuthon_holiday_statement.xml
index e401d74d3..533140069 100644
--- a/yuthon_hr_attendance/views/yuthon_holiday_statement.xml
+++ b/yuthon_hr_attendance/views/yuthon_holiday_statement.xml
@@ -4,10 +4,11 @@
hr.leave.statement.tree
hr.leave
-
+
+
diff --git a/yuthon_hr_attendance/views/yuthon_meal_line_views.xml b/yuthon_hr_attendance/views/yuthon_meal_line_views.xml
index d183b3be4..17337a04c 100644
--- a/yuthon_hr_attendance/views/yuthon_meal_line_views.xml
+++ b/yuthon_hr_attendance/views/yuthon_meal_line_views.xml
@@ -4,10 +4,11 @@
yuthon.meal.line.tree
yuthon.meal.line
-
+
+
diff --git a/yuthon_hr_attendance/views/yuthon_overtime_line_views.xml b/yuthon_hr_attendance/views/yuthon_overtime_line_views.xml
index c41b76fb0..3a667c8fb 100644
--- a/yuthon_hr_attendance/views/yuthon_overtime_line_views.xml
+++ b/yuthon_hr_attendance/views/yuthon_overtime_line_views.xml
@@ -27,7 +27,8 @@
yuthon.overtime.line.tree
yuthon.overtime.line
-
+
+
diff --git a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml
index 2103f5cf3..a0782eeb3 100644
--- a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml
+++ b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml
@@ -4,7 +4,7 @@
vacation.meal.line.tree
vacation.meal.line
-
+
@@ -44,7 +44,7 @@
yuthon.vacation.reports.tree
yuthon.vacation.reports
-
@@ -53,6 +53,7 @@
+
@@ -703,8 +704,9 @@
vacation.over.line.overtime.tree
vacation.over.line
-
+
+
@@ -729,8 +731,9 @@
vacation.over.line.overtime.tree
vacation.over.line
-
+
+
diff --git a/yuthon_hr_employee/models/yuthon_medical_manage.py b/yuthon_hr_employee/models/yuthon_medical_manage.py
index c1ef030a6..b8a135d97 100644
--- a/yuthon_hr_employee/models/yuthon_medical_manage.py
+++ b/yuthon_hr_employee/models/yuthon_medical_manage.py
@@ -9,12 +9,7 @@ class YuthonMedicalManage(models.Model):
_description = '体检费管理'
employee_id = fields.Many2one('hr.employee', string="员工姓名")
- employee_number = fields.Char(
- string='序号',
- related='employee_id.user_number',
- store=True,
- readonly=True
- )
+ employee_number = fields.Char( string='序号', related='employee_id.user_number', store=True, readonly=True)
start_date = fields.Date(string='开始日期')
year = fields.Char(string="年份")
current_year_remaining = fields.Float(string="本年剩余", compute="_compute_current_year_remaining")
diff --git a/yuthon_salary/models/yuthon_meal_expenses.py b/yuthon_salary/models/yuthon_meal_expenses.py
index e5101d226..9851ac63c 100644
--- a/yuthon_salary/models/yuthon_meal_expenses.py
+++ b/yuthon_salary/models/yuthon_meal_expenses.py
@@ -8,6 +8,7 @@ class YuthonMealExpenses(models.Model):
_description = '餐费'
employee_id = fields.Many2one('hr.employee', string='姓名')
+ employee_number = fields.Char(string='序号', related='employee_id.user_number', store=True)
card = fields.Char(string='身份证')
number_breakfasts = fields.Integer(string='早餐次数', compute='_compute_catering_counts', store=True)
number_lunches = fields.Integer(string='午餐次数', compute='_compute_catering_counts', store=True)
diff --git a/yuthon_salary/views/yuthon_meal_expenses_views.xml b/yuthon_salary/views/yuthon_meal_expenses_views.xml
index 51797aff2..5170e3443 100644
--- a/yuthon_salary/views/yuthon_meal_expenses_views.xml
+++ b/yuthon_salary/views/yuthon_meal_expenses_views.xml
@@ -23,7 +23,7 @@
yuthon.meal.expenses.tree
yuthon.meal.expenses
-
+
+