添加功能

This commit is contained in:
李鹏宇
2025-10-14 11:43:54 +08:00
parent 6d31d5c076
commit 0ba08b8c00
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -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')
@@ -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(
@@ -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="安装日期")