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)