!6063 添加功能

Merge pull request !6063 from 李鹏宇/dev_zhou
This commit is contained in:
李鹏宇
2025-10-29 09:26:19 +00:00
committed by Gitee
2 changed files with 4 additions and 6 deletions
@@ -156,6 +156,7 @@ class PropertyBankStatements(models.Model):
contract_ids.append(record.contract_id.id)
contract_ids = list(set(contract_ids))
write_vals = {
'contract_ids': [(6, 0, contract_ids)] if contract_ids else [(5,)]
}
@@ -925,7 +925,7 @@ class PropertyAccountsReceivable(models.Model):
for statement in statements:
statement.write({'bank_state': 'not_reconciled'})
# 批量退回
# 批量退回
def action_refuse_all(self):
model_type_data = {
'水费': 'meter.water.line',
@@ -955,13 +955,10 @@ class PropertyAccountsReceivable(models.Model):
('meter_date', '<=', last_day)
])
else:
year = rec.due_date.year
month = rec.due_date.month
first_day = date(year, month, 1)
last_day = first_day - timedelta(days=1)
last_day = rec.due_date + relativedelta(months=1) - timedelta(days=1)
model_id = self.env[model_type].search([
('contract_id', '=', rec.contract_id.id),
('due_date', '>=', first_day),
('due_date', '>=', rec.due_date),
('due_date', '<=', last_day)
])