diff --git a/yuthon_holiday/models/inherit_hr_leave_allocation.py b/yuthon_holiday/models/inherit_hr_leave_allocation.py index f8d2c06bb..e09becbba 100644 --- a/yuthon_holiday/models/inherit_hr_leave_allocation.py +++ b/yuthon_holiday/models/inherit_hr_leave_allocation.py @@ -65,11 +65,11 @@ class HrLeaveAllocation(models.Model): plan_level = allocation.accrual_plan_id.level_ids.sorted(key=lambda x: x.added_value, reverse=True) for emp_int, emp_list in emp_dict.items(): for level in plan_level: - # level_month = 0 - # if level.added_value_type == 'day': - level_month = level.added_value // 30 - # if level.added_value_type == 'hour': - # level_month = level.added_value // (30 * 24) + level_month = 0 + if level.added_value_type == 'day': + level_month = level.added_value // 30 + if level.added_value_type == 'hour': + level_month = level.added_value // (30 * 7) if emp_int != 0 and emp_int >= level_month: info_list = [{**item, 'number_of_days': level.maximum_leave} for item in allocation._prepare_holiday_values(emp_list)] allocation_vals.extend(info_list) diff --git a/yuthon_hr_attendance/models/resource_calendar_leaves.py b/yuthon_hr_attendance/models/resource_calendar_leaves.py index eecdb53d8..5d9c809e6 100644 --- a/yuthon_hr_attendance/models/resource_calendar_leaves.py +++ b/yuthon_hr_attendance/models/resource_calendar_leaves.py @@ -102,9 +102,9 @@ class ResourceCalendar(models.Model): holiday_list.append((0, 0, holiday_values)) leave_list.append((0, 0, leave_values)) self.calendar_holiday_ids.unlink() + self.global_leave_ids.unlink() self.holiday_data_lines = holiday_list - self.write({'calendar_holiday_ids': holiday_list}) - self.write({'global_leave_ids': leave_list}) + self.write({'calendar_holiday_ids': holiday_list, 'global_leave_ids': leave_list}) class ResourceCalendarHolidaye(models.Model): diff --git a/yuthon_property/__manifest__.py b/yuthon_property/__manifest__.py index 3b78e1c19..236bd126d 100644 --- a/yuthon_property/__manifest__.py +++ b/yuthon_property/__manifest__.py @@ -49,6 +49,11 @@ 'wizard/yuthon_property_wizard_views.xml', 'views/menuitem.xml', ], + # 'assets': { + # 'web.assets_backend': [ + # 'yuthon_property/static/src/scss/approval.scss', + # ], + # }, 'demo': [], 'depends': ['mail', 'documents'], 'installable': True, diff --git a/yuthon_property/static/scss/approval.scss b/yuthon_property/static/scss/approval.scss new file mode 100644 index 000000000..350e1aa18 --- /dev/null +++ b/yuthon_property/static/scss/approval.scss @@ -0,0 +1,49 @@ +.o_kanban_row { + @media (min-width: 768px) { + display: block; + + .o_kanban_group { + display: flex; /* 使用 flex 布局 */ + flex-flow: row wrap; /* 横向排列,并支持换行 */ + min-width: 100%; /* 确保组宽度占满行 */ + + .o_kanban_header { + min-width: 100%; /* 确保标题宽度占满行 */ + width: 100%; + + .o_kanban_header_title { + .o_column_title { + font-weight: bold; /* 确保标题加粗 */ + } + } + } + + .o_kanban_record { + display: inline-block; /* 横向排列 */ + min-width: 332px; /* 设置最小宽度 */ + width: 332px; /* 固定宽度 */ + margin: 4px 8px; /* 设置间距 */ + } + + .o_kanban_load_more { + display: inline-block; /* 与记录一致 */ + min-width: 332px; + width: 332px; + margin: 4px 8px; + } + } + + /* 收拢时的样式调整 */ + .o_column_folded { + .o_kanban_header { + .o_kanban_header_title { + .o_column_title { + transform: none; /* 禁用变形 */ + top: 10px; + left: 20px; /* 调整位置 */ + } + } + } + } + } +} \ No newline at end of file diff --git a/yuthon_property/views/yuthon_property_views.xml b/yuthon_property/views/yuthon_property_views.xml index 60028a69c..87ce4dac6 100644 --- a/yuthon_property/views/yuthon_property_views.xml +++ b/yuthon_property/views/yuthon_property_views.xml @@ -214,12 +214,12 @@ + - @@ -244,10 +244,6 @@ - - - -
评估单价: @@ -282,6 +278,7 @@ 物业 yuthon.property kanban,tree,form + diff --git a/yuthon_property_approval/views/property_lease_contract.xml b/yuthon_property_approval/views/property_lease_contract.xml index 218e368de..5678773ef 100644 --- a/yuthon_property_approval/views/property_lease_contract.xml +++ b/yuthon_property_approval/views/property_lease_contract.xml @@ -165,25 +165,28 @@ 日
- - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - + + + + @@ -239,6 +242,9 @@ + + + diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py index b934c523f..cd2fdbb7f 100644 --- a/yuthon_will_task/models/yuthon_will_task.py +++ b/yuthon_will_task/models/yuthon_will_task.py @@ -28,7 +28,7 @@ class YuthonWillTask(models.Model): user_role_ids = fields.Many2many('soong.user.role', string='角色') task_time_ids = fields.Many2many('yuthon.task.time', string='提醒') yuthon_company = fields.Selection([('thtz', '天河投资集团'), ('thwg', '天河物管'), ('thlc', '天河粮储')], string='所属公司') - start_time = fields.Datetime(string='开始时间', default=fields.Date.today()) + start_time = fields.Datetime(string='开始时间', default=fields.Datetime.now) end_time = fields.Datetime(string='结束时间', default=lambda self: datetime.combine(datetime.now().date(), time(11, 0, 0))) state = fields.Selection([('will', '待办'), ('done', '已办'), ('cancel', '取消')], default='will', string='状态', store=True) @@ -46,7 +46,7 @@ class YuthonWillTask(models.Model): task.user_role_ids = roles def will_task_time(self): - for i in self.search([('state', '!=', 'cancel')]): + for i in self.search([('state', '=', 'will')]): if datetime.now() + timedelta(hours=8) > self.start_time: i.write({'state', 'done'}) for task in self.search([('state', '=', 'will')]):