diff --git a/yuthon_holiday/data/yuthon_holiday_data.xml b/yuthon_holiday/data/yuthon_holiday_data.xml index b3088c82c..c8b17a38e 100644 --- a/yuthon_holiday/data/yuthon_holiday_data.xml +++ b/yuthon_holiday/data/yuthon_holiday_data.xml @@ -12,5 +12,6 @@ yuthon_holiday_fixes_code XZ 4 + \ No newline at end of file diff --git a/yuthon_holiday/models/yuthon_fixes_approval.py b/yuthon_holiday/models/yuthon_fixes_approval.py index 694fb15d0..a4f146be7 100644 --- a/yuthon_holiday/models/yuthon_fixes_approval.py +++ b/yuthon_holiday/models/yuthon_fixes_approval.py @@ -51,5 +51,8 @@ class YuthonFixesApproval(models.Model): 'number_of_days': number_of_days, 'type_request_unit':type_request_unit,}) - + @api.onchange('users_id', 'original_hours', 'now_hours') + def _onchange_name(self): + if self.users_id and self.original_hours and self.now_hours: + self.name = self.users_id.name + '原时长'+ str(self.original_hours) + '小时' + '现时长' + str(self.now_hours) + '小时' diff --git a/yuthon_holiday/views/yuthon_fixes_approval_views.xml b/yuthon_holiday/views/yuthon_fixes_approval_views.xml index c76ed18e9..5f7830933 100644 --- a/yuthon_holiday/views/yuthon_fixes_approval_views.xml +++ b/yuthon_holiday/views/yuthon_fixes_approval_views.xml @@ -45,6 +45,7 @@ +