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_date
| Inputs | Method | Outputs |
|---|---|---|
|
for statement in self:
# When we create lines manually from the form view, they don't have any `internal_index` set yet.
sorted_lines = statement.line_ids.filtered('internal_index').sorted('internal_index')
- statement.date = sorted_lines.filtered(lambda l: l.state == 'posted')[-1:].date
+ statement.date = sorted_lines.filtered(lambda l: l.state == 'posted')[-1:].date or statement.date
|
|
