CMFActivity: Always set zope.globalrequest WIP
ERP5 uses a mix of context.REQUEST and Products.ERP5Type.Global.get_request(), which now uses zope.globalrequest.getRequest(). CMFActivity reconstruct the original request before executing activity, so that the activity is executed with a request equivalent to the request at the time where the method was activated. For this, context.REQUEST was properly restored, but get_request()/globalrequest was only restored when the REQUEST had some ACCEPT_LANGUAGE header, so that it replays the language negociation for Localizer. With browser requests, I guess every browser pass an ACCEPT_LANGUAGE header, but within unit tests such header is not present. (TODO: finish this message)
Showing
Please register or sign in to comment