Merge pull request !4905 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2025-09-05 06:21:24 +00:00
committed by Gitee
@@ -65,17 +65,12 @@ class PropertyBankStatements(models.Model):
information = self.env['property.tenant.information'].search(
[('name', '=', rec.name_account)],
limit=1)
if not information:
raise UserError(f"未找到对应的{information.name}的银行账户信息")
if information:
if information.bank_ids:
information.bank_ids.unlink()
information.bank_ids.create({
bank_lines = self.env['property.bank.line'].create({
'tenant_id': information.id,
'bank': rec.name,
'user': information.name,
'name': information.name
'name': rec.name,
})
tenant_id = bank_lines[0].tenant_id.id