In case you are printing in html a report with minimal layout, you will have an error since the function is not defined, but called by the onload of the body tag. Now we don't call subst if it is not needed (and so not declared) closes odoo/odoo#29341