'Reconcile a journal entry corresponding to a payment with its bank statement line'

def reconcile(self, liquidity_aml, amount=0.0, amount_currency=0.0, currency_id=None):

    bank_stmt = self.acc_bank_stmt_model.create({'journal_id': liquidity_aml.journal_id.id, 'date': (time.strftime('%Y') + '-07-15')})
    bank_stmt_line = self.acc_bank_stmt_line_model.create({'name': 'payment', 'statement_id': bank_stmt.id, 'partner_id': self.partner_agrolait.id, 'amount': amount, 'amount_currency': amount_currency, 'currency_id': currency_id, 'date': (time.strftime('%Y') + '-07-15')})
    amount_in_widget = ((currency_id and amount_currency) or amount)
    bank_stmt_line.process_reconciliation(payment_aml_rec=liquidity_aml)
    return bank_stmt
