!12048 添加功能

Merge pull request !12048 from 李鹏宇/dev_zhou
This commit is contained in:
李鹏宇
2026-06-12 07:31:45 +00:00
committed by Gitee
@@ -38,12 +38,17 @@ class PropertyAccountsReceivable(models.Model):
@api.depends('is_reconciliation', 'payout_date', 'due_date_end')
def _compute_is_overdue(self):
for rec in self:
has_penalty = self.env['property.accounts.receivable'].search([
('contract_id', '=', rec.contract_id.id),
('due_date', '=', rec.payout_date),
('management_type_id.name', '=', '违约金'),
], limit=1)
rec.is_overdue = (
rec.is_reconciliation
and rec.payout_date
and (rec.due_date_end or rec.due_date)
and rec.payout_date > (rec.due_date_end or rec.due_date)
)
and not has_penalty)
difference_amount = fields.Float(string='差额')
print_date = fields.Date(string='打印日期')