Global existence of weak solutions to the Navier-Stokes equations coupled with the heat equation by the external force dependent on temperature is proved. The problem is considered in a cylindrical domain under boundary slip conditions and with inflow and outflow. Moreover, the Neumann boundary condition for the temperature is assumed on the lateral surface of the cylinder, while on the remaining part of the boundary, the Dirichlet condition is supposed. We derive such an estimate that inflow and outflow need not vanish as t → ∞.