'Return the move line that gets to be reconciled (the one in the receivable account)'

def create_invoice(self, amount):

    vals = {'partner_id': self.partner_agrolait.id, 'type': 'out_invoice', 'name': '-', 'currency_id': self.env.user.company_id.currency_id.id}
    invoice = self.i_model.new(vals)
    invoice._onchange_partner_id()
    vals.update({'account_id': invoice.account_id.id})
    invoice = self.i_model.create(vals)
    self.il_model.create({'quantity': 1, 'price_unit': amount, 'invoice_id': invoice.id, 'name': '.', 'account_id': self.env['account.account'].search([('user_type_id', '=', self.env.ref('account.data_account_type_revenue').id)], limit=1).id})
    invoice.action_invoice_open()
    mv_line = None
    for l in invoice.move_id.line_ids:
        if (l.account_id.id == vals['account_id']):
            mv_line = l
    self.assertIsNotNone(mv_line)
    return mv_line
