def METHOD_NAME(self):
    with self.assertRaises(ValidationError):
        order = self.env["account.payment.order"].create(
            {"payment_mode_id": self.inbound_mode.id, "journal_id": self.journal.id}
        )
        order.payment_type = "outbound"