@@ -506,8 +506,8 @@ class PropertyBankStatements(models.Model):
|
||||
|
||||
current_sequence += 10
|
||||
|
||||
if vals_list and type_name:
|
||||
used_type_names.add(type_name)
|
||||
if vals_list and type_name:
|
||||
used_type_names.add(type_name)
|
||||
|
||||
return vals_list, current_sequence
|
||||
|
||||
@@ -599,8 +599,8 @@ class PropertyBankStatements(models.Model):
|
||||
])
|
||||
if statements:
|
||||
unreconciled[account] = len(statements)
|
||||
if unreconciled:
|
||||
raise UserError("存在未对账的历史流水,请优先处理:")
|
||||
# if unreconciled:
|
||||
# raise UserError("存在未对账的历史流水,请优先处理:")
|
||||
|
||||
def button_reconciliation(self):
|
||||
for record in self:
|
||||
|
||||
@@ -71,15 +71,10 @@ class BindingInformationWizard(models.Model):
|
||||
if old_lines:
|
||||
old_lines.unlink()
|
||||
for contract_id in latest_contract_ids:
|
||||
existing_line = self.env['property.tenant.line'].sudo().search([
|
||||
('tenant_id', '=', bank_account.tenant_id.id),
|
||||
('lease_contract_id', '=', contract_id.id),
|
||||
], limit=1)
|
||||
if not existing_line:
|
||||
self.env['property.tenant.line'].sudo().create({
|
||||
'tenant_id': bank_account.tenant_id.id,
|
||||
'lease_contract_id': contract_id.id,
|
||||
})
|
||||
self.env['property.tenant.line'].sudo().create({
|
||||
'tenant_id': bank_account.tenant_id.id,
|
||||
'lease_contract_id': contract_id.id,
|
||||
})
|
||||
|
||||
if self.contract_ids:
|
||||
for new_contract in self.contract_ids:
|
||||
@@ -95,14 +90,6 @@ class BindingInformationWizard(models.Model):
|
||||
'user': self.bank_id.name_account,
|
||||
'name': self.bank_id.bank_branch,
|
||||
})
|
||||
|
||||
# 更新其他记录
|
||||
bank_ids = self.env['property.bank.statements'].search([('name', '=', self.bank_id.name),
|
||||
('your_own_unit', '=', self.bank_id.your_own_unit),
|
||||
('bank_state', '=', 'not_reconciled'),
|
||||
])
|
||||
for bank_id in bank_ids:
|
||||
bank_id._compute_property_employee_id()
|
||||
else:
|
||||
if self.contract_ids:
|
||||
first_contract = self.contract_ids[0]
|
||||
@@ -127,4 +114,10 @@ class BindingInformationWizard(models.Model):
|
||||
self.bank_id.write({
|
||||
'name': name,
|
||||
})
|
||||
self.bank_id._compute_property_employee_id()
|
||||
|
||||
bank_ids = self.env['property.bank.statements'].search([('name', '=', self.bank_id.name),
|
||||
('your_own_unit', '=', self.bank_id.your_own_unit),
|
||||
('bank_state', '=', 'not_reconciled'),
|
||||
])
|
||||
for bank_id in bank_ids:
|
||||
bank_id._compute_property_employee_id()
|
||||
@@ -438,7 +438,7 @@ class PropertyReconciliationWizard(models.Model):
|
||||
yes_amount = 0
|
||||
for line in rec.reconciliation_line_ids:
|
||||
# 跳过金额为0的行
|
||||
if (line.amount == 0 and line.collection_type != 'penalty') or \
|
||||
if (round(line.rent or 0, 2) == 0 and line.collection_type != 'penalty') or \
|
||||
(line.contract_id and line.contract_id.is_contract):
|
||||
continue
|
||||
if line.amount != line.rent:
|
||||
|
||||
Reference in New Issue
Block a user