Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Invoicing

Entity: account.bank.statement

Compute Method: _compute_is_complete

View 19.0 View 20.0
Inputs Method Outputs
  • line_ids
  • currency_id
  • balance_end
  • balance_end_real
for stmt in self:
-             stmt.is_complete = stmt.line_ids.filtered(lambda l: l.state == 'posted') and stmt.currency_id.compare_amounts(
-                 stmt.balance_end, stmt.balance_end_real) == 0
+             stmt.is_complete = len(stmt.line_ids) == 0 or (stmt.line_ids.filtered(lambda x: x.state in {'draft', 'posted'}) and stmt.currency_id.compare_amounts(stmt.balance_end, stmt.balance_end_real) == 0)
  • is_complete

Back to entity