<|endoftext|> Prompt: Create an Odoo model class named AccountBankStatement with balance_end attribute Completion: class AccountBankStatement(models.Model):
    _name = "account.bank.statement"
    _description = "Bank Statement"
    balance_end = fields.Monetary(
        string='Computed Balance',
        compute='_compute_balance_end', store=True,
    )
    @api.depends('balance_start', 'line_ids.amount', 'line_ids.state')
    def _compute_balance_end(self):
            for stmt in self:
                        lines = stmt.line_ids.filtered(lambda x: x.state == 'posted')
                        stmt.balance_end = stmt.balance_start + sum(lines.mapped('amount'))
<|endoftext|>