@@ -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
|
||||
|
||||
Reference in New Issue
Block a user