From 9d0747e0178c2ca5b53f3d5cc0dc48b193ce7b35 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Thu, 2 Jan 2025 15:02:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_holiday/__manifest__.py | 1 + yuthon_holiday/data/yuthon_holiday_data.xml | 10 ++++++++ yuthon_holiday/models/inherit_hr_leave.py | 2 +- .../views/hr_attendance_views.xml | 3 ++- .../views/yuthon_property_views.xml | 24 +++++++++---------- 5 files changed, 26 insertions(+), 14 deletions(-) create mode 100644 yuthon_holiday/data/yuthon_holiday_data.xml diff --git a/yuthon_holiday/__manifest__.py b/yuthon_holiday/__manifest__.py index 6a5391155..930815d26 100644 --- a/yuthon_holiday/__manifest__.py +++ b/yuthon_holiday/__manifest__.py @@ -7,6 +7,7 @@ 'license': 'LGPL-3', 'data': [ 'security/ir.model.access.csv', + 'data/yuthon_holiday_data.xml', 'views/inherit_hr_type_views.xml', 'views/inherit_hr_leave_allocation_views.xml', 'views/inherit_hr_leave_accrual_plan_views.xml', diff --git a/yuthon_holiday/data/yuthon_holiday_data.xml b/yuthon_holiday/data/yuthon_holiday_data.xml new file mode 100644 index 000000000..2f4c53bf1 --- /dev/null +++ b/yuthon_holiday/data/yuthon_holiday_data.xml @@ -0,0 +1,10 @@ + + + + 请假编号 + yuthon_holiday_code + QJ + 4 + + + \ No newline at end of file diff --git a/yuthon_holiday/models/inherit_hr_leave.py b/yuthon_holiday/models/inherit_hr_leave.py index 9badd12d8..b60c051f3 100644 --- a/yuthon_holiday/models/inherit_hr_leave.py +++ b/yuthon_holiday/models/inherit_hr_leave.py @@ -122,7 +122,7 @@ class HolidaysRequestBatch(models.Model): raise return emp - code = fields.Char(string='编号', default='\\') + code = fields.Char(string="物业编号", default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_holiday_code')) name = fields.Char(string='标题') employee_id = fields.Many2one(string='员工', comodel_name='hr.employee', required=True, default=_get_default_emp, index=True) diff --git a/yuthon_hr_attendance/views/hr_attendance_views.xml b/yuthon_hr_attendance/views/hr_attendance_views.xml index 24236a36b..ccf538903 100644 --- a/yuthon_hr_attendance/views/hr_attendance_views.xml +++ b/yuthon_hr_attendance/views/hr_attendance_views.xml @@ -8,11 +8,11 @@ edit="false" delete="false" create="false" editable="bottom" banner_route="/attendance/banner/route"> + - @@ -32,6 +32,7 @@ + diff --git a/yuthon_property/views/yuthon_property_views.xml b/yuthon_property/views/yuthon_property_views.xml index 36d593ef4..60028a69c 100644 --- a/yuthon_property/views/yuthon_property_views.xml +++ b/yuthon_property/views/yuthon_property_views.xml @@ -100,18 +100,6 @@ - - - - - - - - - - - - @@ -129,6 +117,18 @@ + + + + + + + + + + + +