From 43248bc6677b2bbf29e1dd1ca08c2fbb626153e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Thu, 23 Oct 2025 18:41:22 +0800 Subject: [PATCH] =?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_property/wizard/task_push_wizard.py | 4 ++-- yuthon_property_approval/models/inherit_yuthon_property.py | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/yuthon_property/wizard/task_push_wizard.py b/yuthon_property/wizard/task_push_wizard.py index 505001519..f8a975083 100644 --- a/yuthon_property/wizard/task_push_wizard.py +++ b/yuthon_property/wizard/task_push_wizard.py @@ -28,7 +28,7 @@ class TaskPushWizard(models.TransientModel): if meter.is_acc: remark = '新合同,暂无需抄表' else: - remark = str(start_date) + '-' + str(end_date) + remark = str(start_date) + '到' + str(end_date) self.env['property.accounts.receivable'].create({ 'contract_id': meter.contract_id.id, @@ -52,7 +52,7 @@ class TaskPushWizard(models.TransientModel): if water.is_acc: remark = '新合同,暂无需抄表' else: - remark = str(start_date) + '-' + str(end_date) + remark = str(start_date) + '到' + str(end_date) self.env['property.accounts.receivable'].create({ 'contract_id': water.contract_id.id, diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py index 57ad4d3c7..540a906bf 100644 --- a/yuthon_property_approval/models/inherit_yuthon_property.py +++ b/yuthon_property_approval/models/inherit_yuthon_property.py @@ -863,9 +863,8 @@ class PropertyAccountsReceivable(models.Model): if not model_type: continue if model_type in ('meter.archives.line', 'meter.water.line'): - due_date = fields.Date.to_date(rec.due_date) - year = due_date.year - month = due_date.month + year = rec.due_date_end.year + month = rec.due_date_end.month first_day = date(year, month, 1) if month == 12: next_month_first_day = date(year + 1, 1, 1)