From cf9aad6a08b4e73c919334ffe2d4104d80a9de78 Mon Sep 17 00:00:00 2001 From: sunjie Date: Sun, 10 Aug 2025 00:20:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B8=80=E4=B8=8B=20property?= =?UTF-8?q?=5Fmeter=5Fwater=5Fviews=20=E8=A7=86=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_hr_attendance/controllers/applet_attendance.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/yuthon_hr_attendance/controllers/applet_attendance.py b/yuthon_hr_attendance/controllers/applet_attendance.py index 68c5e480d..432970366 100644 --- a/yuthon_hr_attendance/controllers/applet_attendance.py +++ b/yuthon_hr_attendance/controllers/applet_attendance.py @@ -758,7 +758,7 @@ class AppletAttendance(Controller): _logger.info(f'月初数据:{start_of_month}') records = request.env(user=SUPERUSER_ID)['property.accounts.receivable'].search( - [('lessee_id', '=', lessee_id)], order='payout_date desc') + [('lessee_id', '=', lessee_id)], order='due_date desc') # 根据月份分组后再根据物业统计 # 月份分组数据中有各个物业的合计 @@ -790,7 +790,10 @@ class AppletAttendance(Controller): property_dict.get('list').append({ 'id': record.id, 'submitted': float_repr(float_round(record.submitted, precision_rounding=0.01), 2), - 'management_type': record.management_type_id.name + 'original_amount': float_repr(float_round(record.original_amount - record.discount_amount, precision_rounding=0.01), 2), + 'management_type': record.management_type_id.name, + 'start_date': fields.Date.to_string(record.due_date), + 'end_date': fields.Date.to_string(record.due_date_end) if record.due_date_end else ( fields.Date.to_string(record.payout_date) if record.payout_date else '----'), }) result = []