[FIX] report: thread-safe barcode generation
A lock occurs when the user wants to print a report having multiple barcode while the server is started in threaded-mode. The reason is that reportlab has to build a cache of the T1 fonts before rendering a barcode (done in a C extension) and this part is not thread safe. We attempt here to init the T1 fonts cache at the start-up of Odoo so that rendering of barcode in multiple thread does not lock the server. Another workaround was to set an explicit lock around the reportlab's function call, but it's more dangerous as it may introduce undetectable lock between python and postgresql. Thanks to @odony and @KangOl. Fixes #12236
Please register or sign in to comment