diff --git a/yuthon_hr_attendance/models/card_approval.py b/yuthon_hr_attendance/models/card_approval.py index b77673305..3e71e5412 100644 --- a/yuthon_hr_attendance/models/card_approval.py +++ b/yuthon_hr_attendance/models/card_approval.py @@ -85,7 +85,6 @@ class CardApprovals(models.Model): self.attendance_id.write({'check_in': start_time, 'check_out': end_time}) self.is_attendance = True self.attendance = original_attendance - else: min_hour_from = self.users_id.employee_id.resource_id.calendar_id.attendance_ids[0].hour_from min_hour = int(min_hour_from) @@ -107,13 +106,14 @@ class CardApprovals(models.Model): rec.attendance_id.check_out = current_datetime.replace(hour=max_hour, minute=max_minute) - timedelta(hours=8) self.is_attendance = True self.attendance = original_attendance - + workflow_id = self.env['soong.workflow.record'].search([('code', '=', self.code)], limit=1).id self.attendance_id.sudo().write({ 'is_approval': True, 'is_abnormal': False, 'is_no_card': False, 'is_late_card': False, 'is_early_card': False, + 'workflow_id': workflow_id, }) @api.onchange('is_issues') diff --git a/yuthon_property/models/property_meter_archives.py b/yuthon_property/models/property_meter_archives.py index a3d8e76df..1a3e09e2e 100644 --- a/yuthon_property/models/property_meter_archives.py +++ b/yuthon_property/models/property_meter_archives.py @@ -19,7 +19,7 @@ class PropertyMeterArchives(models.Model): installation_location = fields.Char(string="安装位置") is_state = fields.Boolean(string="是否启用") type = fields.Selection([("public", "公共"), ("fees", "收费")], string="类型") - gauge_magnification = fields.Integer(string="仪表倍率", default=1, group_operator='count_true') + gauge_magnification = fields.Integer(string="仪表倍率", default=1) maximum_count = fields.Integer(string="最大位数") lessee_id = fields.Many2one( "property.tenant.information", @@ -235,7 +235,7 @@ class MeterArchivesLine(models.Model): current_read = fields.Float(string="本次读数", group_operator=None) unit_number = fields.Char(string="单元编号/用途") gauge_magnification = fields.Integer( - string="仪表倍率", readonly=True, default=1, group_operator=None + string="仪表倍率", readonly=True, default=1 ) last_reading_time = fields.Date(string="最后读数时间") receivables = fields.Float( diff --git a/yuthon_property/models/property_meter_water.py b/yuthon_property/models/property_meter_water.py index 480588c4e..098eaf870 100644 --- a/yuthon_property/models/property_meter_water.py +++ b/yuthon_property/models/property_meter_water.py @@ -21,7 +21,7 @@ class PropertyMeterWater(models.Model): installation_location = fields.Char(string="安装位置") is_state = fields.Boolean(string="是否启用") type = fields.Selection([("public", "公共"), ("fees", "收费")], string="类型") - gauge_magnification = fields.Integer(string="仪表倍率", default=1, group_operator='count_true') + gauge_magnification = fields.Integer(string="仪表倍率", default=1) maximum_count = fields.Integer(string="最大位数") lessee_id = fields.Many2one( "property.tenant.information", @@ -187,7 +187,7 @@ class MeterWaterLine(models.Model): unit_number = fields.Char(string='单元编号/用途') unit = fields.Float(string='当月单价', group_operator=None) receivables = fields.Float(string="应收", store=True, group_operator=None, help="应收金额=本次用量*单价*(1+线损)") - gauge_magnification = fields.Integer(string='仪表倍率', readonly=True, default=1, group_operator='count_true') + gauge_magnification = fields.Integer(string='仪表倍率', readonly=True, default=1) last_reading_time = fields.Date(string="最后读数时间") type = fields.Selection([("public", "公共"), ("fees", "收费")], string="类型") start_time = fields.Date(string="安装日期")