def METHOD_NAME(self):
    """
    Generate an invoice from a sale order.
    Check that related documents are passed
    from the sale order (and its lines) to the invoice (and its lines).
    """
    order_line, sale_order = self._create_order()
    # Check the invoice
    invoice = sale_order._create_invoices()
    self.assertEqual(len(invoice), 1, "Multiple invoices for sale order")
    self.assertEqual(invoice.related_documents, sale_order.related_documents)
    # Check the invoice line
    invoice_line = invoice.invoice_line_ids.filtered(
        lambda l: order_line in l.sale_line_ids
    )
    self.assertEqual(
        len(invoice_line), 1, "Multiple invoice lines for sale order line"
    )
    self.assertEqual(invoice_line.related_documents, order_line.related_documents)
    self.assertEqual(invoice_line.admin_ref, order_line.admin_ref)