diff --git a/yuthon_property_approval/wizard/property_rental_wizard.py b/yuthon_property_approval/wizard/property_rental_wizard.py index 9196c0b16..297aea419 100644 --- a/yuthon_property_approval/wizard/property_rental_wizard.py +++ b/yuthon_property_approval/wizard/property_rental_wizard.py @@ -196,7 +196,7 @@ class PropertyRentalWizard(models.Model): date_str = f"{date_field_year_month}-{start_day}" start_date = datetime.strptime(date_str, "%Y-%m-%d") # 当期应收日期 - if start_year_month <= date_field_year_month < end_year_month: + if start_year_month <= date_field_year_month <= end_year_month: self.create_rent_list(record, rent_id, rent_amount, start_date, multiplier) self.create_management_list(record, start_date) @@ -219,6 +219,7 @@ class PropertyRentalWizard(models.Model): records = self.env['property.lease.contract'].search([ ('actual_start_time', '<=', last_day), ('actual_end_time', '>=', first_day), + ('contract_code', '=', '租(2022)N01号') ]) for record in records: date_data = {