From e9e97c8acbbf9f588cdc37e89b2f9f84812db8b5 Mon Sep 17 00:00:00 2001
From: zhou <123@>
Date: Wed, 27 Aug 2025 14:56:37 +0800
Subject: [PATCH 1/2] =?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_hr_attendance/models/hr_attendance.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/yuthon_hr_attendance/models/hr_attendance.py b/yuthon_hr_attendance/models/hr_attendance.py
index 1b31ad9ba..c10cb576a 100644
--- a/yuthon_hr_attendance/models/hr_attendance.py
+++ b/yuthon_hr_attendance/models/hr_attendance.py
@@ -169,17 +169,18 @@ class HrAttendance(models.Model):
#考勤异常提醒
def attendance_abnormal_remind(self):
- menu_id = self.env['ir.ui.menu'].search([('name', '=', '我的异常')])
all_employees = self.env['hr.employee'].search([])
current_date = fields.Date.today()
month_start = current_date.replace(day=1)
month_end = (month_start + relativedelta(months=1) - relativedelta(days=1))
+ current_time = fields.Datetime.now()
for employee in all_employees:
domain = [
('shift_name', '=', '行政班次'),
('employee_id', '=', employee.id),
('current_data', '>=', month_start),
- ('current_data', '<=', month_end)
+ ('current_data', '<=', month_end),
+ ('employee_id.name', '=', '叶华锋')
]
is_no_card = 0
is_early_card = 0
@@ -207,6 +208,8 @@ class HrAttendance(models.Model):
description="本月迟到: {}\n本月缺卡: {}\n本月早退: {}\n本月异常:{}\n 本月旷工: {}\n"
.format(is_late_card, is_no_card, is_early_card, is_abnormal, absenteeism_card),
url=url, btntxt="详细信息")
+
+ logging.info(f"执行时间为{current_time}")
logging.info(f"打卡异常提醒发送成功,员工:{employee.name},本月迟到: {is_late_card},本月缺卡: {is_no_card},本月早退: {is_early_card},本月异常:{is_abnormal},本月旷工: {absenteeism_card}")
def missing_card_judgment(self):
From 9243b656a9097b0f4f9927d6b5e71a6f67bd2b5a Mon Sep 17 00:00:00 2001
From: zhou <123@>
Date: Wed, 27 Aug 2025 15:28:07 +0800
Subject: [PATCH 2/2] =?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
---
.../views/yuthon_message_login_views.xml | 24 +++++++++----------
.../models/property_meter_archives.py | 13 +++++++---
.../models/property_meter_water.py | 13 +++++++---
.../models/property_tariff_list.py | 1 -
yuthon_property/models/property_water_list.py | 1 -
.../views/property_tariff_list_views.xml | 1 -
.../views/property_water_list_views.xml | 1 -
.../views/inherit_yuthon_property_views.xml | 14 +++++------
.../views/property_lease_contract.xml | 6 ++---
.../wizard/choose_property_wizard.py | 15 ++++--------
10 files changed, 47 insertions(+), 42 deletions(-)
diff --git a/yuthon_hr_employee_approval/views/yuthon_message_login_views.xml b/yuthon_hr_employee_approval/views/yuthon_message_login_views.xml
index 5b30e3d58..c80918eef 100644
--- a/yuthon_hr_employee_approval/views/yuthon_message_login_views.xml
+++ b/yuthon_hr_employee_approval/views/yuthon_message_login_views.xml
@@ -59,33 +59,33 @@
+
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/yuthon_property/models/property_meter_archives.py b/yuthon_property/models/property_meter_archives.py
index 242ae77ae..10656dd19 100644
--- a/yuthon_property/models/property_meter_archives.py
+++ b/yuthon_property/models/property_meter_archives.py
@@ -39,7 +39,7 @@ class PropertyMeterArchives(models.Model):
def _compute_receivables(self):
for record in self:
if record.line_loss and record.current_meter and record.unit:
- record.receivables = record.current_meter * record.unit * record.line_loss
+ record.receivables = record.current_meter * record.unit * (1 + record.line_loss) * record.gauge_magnification
def format_update(self):
insurances_ids = self.env["property.meter.archives"].browse(
@@ -82,13 +82,20 @@ class PropertyMeterArchives(models.Model):
else:
record.archives_state = 'use'
+ @api.onchange('current_meter')
+ def _onchange_current_meter(self):
+ current_date = fields.Date.today()
+ if self.current_meter > 0:
+ self.is_push = False
+ self.meter_date = current_date
+
@api.onchange('current_read', 'last_read')
def _onchange_current_meter(self):
for record in self:
if record.current_read > record.last_read:
- record.current_meter = (record.current_read - record.last_read) * record.gauge_magnification
+ record.current_meter = record.current_read - record.last_read
else:
- record.current_meter = (record.maximum_count - record.last_read + record.current_read) * record.gauge_magnification
+ record.current_meter = record.maximum_count - record.last_read + record.current_read
@api.onchange('yuthon_property_id')
def _onchange_property(self):
diff --git a/yuthon_property/models/property_meter_water.py b/yuthon_property/models/property_meter_water.py
index 82cde3629..37f1f80c6 100644
--- a/yuthon_property/models/property_meter_water.py
+++ b/yuthon_property/models/property_meter_water.py
@@ -38,7 +38,7 @@ class PropertyMeterWater(models.Model):
def _compute_receivables(self):
for record in self:
if record.line_loss and record.current_meter and record.unit:
- record.receivables = record.current_meter * record.unit * record.line_loss
+ record.receivables = record.current_meter * record.unit * (1 + record.line_loss) * record.gauge_magnification
def format_update(self):
insurances_ids = self.env["property.meter.water"].browse(
@@ -51,6 +51,13 @@ class PropertyMeterWater(models.Model):
record.write({'maximum_count': 99999,
})
+ @api.onchange('current_meter')
+ def _onchange_current_meter(self):
+ current_date = fields.Date.today()
+ if self.current_meter > 0:
+ self.is_push = False
+ self.meter_date = current_date
+
@api.depends('lessee_id')
def _compute_water_state(self):
for record in self:
@@ -86,9 +93,9 @@ class PropertyMeterWater(models.Model):
def _onchange_current_meter(self):
for record in self:
if record.current_read > record.last_read:
- record.current_meter = (record.current_read - record.last_read) * record.gauge_magnification
+ record.current_meter = record.current_read - record.last_read
else:
- record.current_meter = (record.maximum_count - record.last_read + record.current_read) * record.gauge_magnification
+ record.current_meter = record.maximum_count - record.last_read + record.current_read
@api.onchange('yuthon_property_id')
diff --git a/yuthon_property/models/property_tariff_list.py b/yuthon_property/models/property_tariff_list.py
index c03bb21b6..7ed2cb876 100644
--- a/yuthon_property/models/property_tariff_list.py
+++ b/yuthon_property/models/property_tariff_list.py
@@ -5,7 +5,6 @@ class PropertyTariffList(models.Model):
_name = 'property.tariff.list'
_description = '电费列表'
- contract_code = fields.Char(string='合同编号')
property_id = fields.Many2one('yuthon.property', string='物业')
admin_id = fields.Many2one(related='property_id.admin_id', string="片区管理员", store=True)
lessee_id = fields.Many2one('property.tenant.information', string='承租方')
diff --git a/yuthon_property/models/property_water_list.py b/yuthon_property/models/property_water_list.py
index 172a47e2d..085f95f16 100644
--- a/yuthon_property/models/property_water_list.py
+++ b/yuthon_property/models/property_water_list.py
@@ -5,7 +5,6 @@ class PropertyWaterList(models.Model):
_name = 'property.water.list'
_description = '水费列表'
- contract_code = fields.Char(string='合同编号')
property_id = fields.Many2one('yuthon.property', string='物业')
lessee_id = fields.Many2one('property.tenant.information', string='承租方')
admin_id = fields.Many2one(related='property_id.admin_id', string="片区管理员", store=True)
diff --git a/yuthon_property/views/property_tariff_list_views.xml b/yuthon_property/views/property_tariff_list_views.xml
index def1ce6de..74deede81 100644
--- a/yuthon_property/views/property_tariff_list_views.xml
+++ b/yuthon_property/views/property_tariff_list_views.xml
@@ -6,7 +6,6 @@
-
diff --git a/yuthon_property/views/property_water_list_views.xml b/yuthon_property/views/property_water_list_views.xml
index fcda7ab1a..33503a5f5 100644
--- a/yuthon_property/views/property_water_list_views.xml
+++ b/yuthon_property/views/property_water_list_views.xml
@@ -6,7 +6,6 @@
-
diff --git a/yuthon_property_approval/views/inherit_yuthon_property_views.xml b/yuthon_property_approval/views/inherit_yuthon_property_views.xml
index 7bb1a9f81..c9a3d5624 100644
--- a/yuthon_property_approval/views/inherit_yuthon_property_views.xml
+++ b/yuthon_property_approval/views/inherit_yuthon_property_views.xml
@@ -56,7 +56,7 @@
-
+
@@ -170,8 +170,8 @@
property.tariff.list
-
-
+
+
@@ -216,8 +216,8 @@
property.water.list
-
-
+
+
@@ -293,8 +293,8 @@
-
-
+
+
diff --git a/yuthon_property_approval/views/property_lease_contract.xml b/yuthon_property_approval/views/property_lease_contract.xml
index 199f6a0d5..31842c0bc 100644
--- a/yuthon_property_approval/views/property_lease_contract.xml
+++ b/yuthon_property_approval/views/property_lease_contract.xml
@@ -72,9 +72,9 @@
-
+
-
+
@@ -397,7 +397,7 @@
-
+