diff --git a/yuthon_property_approval/wizard/property_rental_wizard.py b/yuthon_property_approval/wizard/property_rental_wizard.py index 1f77af193..72999030d 100644 --- a/yuthon_property_approval/wizard/property_rental_wizard.py +++ b/yuthon_property_approval/wizard/property_rental_wizard.py @@ -42,7 +42,7 @@ class PropertyRentalWizard(models.Model): # 判断是否有已生成应收 existing_receivable = self.env['property.accounts.receivable'].search([ ('lessee_id', '=', record.lessee_id.id), - ('due_date', '>=', first_day_of_month), + ('due_date', '>', first_day_of_month), ('due_date', '<=', last_day_of_month), ('management_type_id.name', '=', '租金'), ('contract_id', '=', record.id), @@ -263,6 +263,7 @@ class PropertyRentalWizard(models.Model): records = self.env['property.lease.contract'].search(domain +[ ('actual_start_time', '<', next_month_first_day), ('actual_end_time', '>=', first_day), + ('contract_code', '=', '租(2021)E02号') ]) if not records: records = self.env['property.lease.contract'].search(domain +[