添加功能

This commit is contained in:
李鹏宇
2025-10-15 19:01:49 +08:00
parent 8bc4ea8232
commit 5636cdb309
@@ -177,13 +177,11 @@ class PropertyRentalWizard(models.Model):
date_field_year_month = date_field.strftime('%Y-%m')
# 获取当月第一天和最后一天
first_day = datetime.strptime(date_field_year_month, '%Y-%m').date()
last_day = first_day + relativedelta(months=1) - relativedelta(days=1)
next_month_first_day = first_day + relativedelta(months=1)
records = self.env['property.lease.contract'].search([
('actual_start_time', '<', next_month_first_day),
('actual_end_time', '>=', first_day),
])
for record in records:
# 获取租金乘数(1 表示按月,3 表示季租金,6 表示半年租金,年后面赋值)
multiplier = self.get_multiplier(record.cycle_dict)