添加功能
This commit is contained in:
@@ -180,7 +180,6 @@ class SoongWorkflowRecord(models.Model):
|
||||
)
|
||||
if not valid_records:
|
||||
return
|
||||
# 以下逻辑完全不变,和你原来一致
|
||||
start_records = valid_records.filtered(lambda r: r.approve_state == 'start')
|
||||
start_records.is_to_do = True
|
||||
remaining_records = valid_records - start_records
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from odoo import models, fields, api
|
||||
from odoo.exceptions import UserError, ValidationError
|
||||
from dateutil.relativedelta import relativedelta
|
||||
from datetime import datetime, timedelta, date
|
||||
|
||||
|
||||
class ElectricWaterWizard(models.TransientModel):
|
||||
@@ -17,9 +18,9 @@ class ElectricWaterWizard(models.TransientModel):
|
||||
month_start = push_date.replace(day=1)
|
||||
# 当月最后一天(处理12月边界)
|
||||
if push_date.month == 12:
|
||||
month_end = push_date.replace(year=push_date.year + 1, month=1, day=1) - datetime.timedelta(days=1)
|
||||
month_end = push_date.replace(year=push_date.year + 1, month=1, day=1) - timedelta(days=1)
|
||||
else:
|
||||
month_end = push_date.replace(month=push_date.month + 1, day=1) - datetime.timedelta(days=1)
|
||||
month_end = push_date.replace(month=push_date.month + 1, day=1) - timedelta(days=1)
|
||||
# 处理电表推送
|
||||
if self.meter_ids:
|
||||
is_acc = False
|
||||
|
||||
Reference in New Issue
Block a user