Tuesday, January 12, 2021
4 changes · master
Enhancements to existing features
Barcode images in many printed reports are now embedded directly instead of being fetched one by one from the server. This reduces server load and lowers the risk of report printing failures when handling large batches of records.
Original PR description
When printing barcodes for a large amount of records, wkhtmltopdf will make the same amount of http requests to the server in order to retrieve barcodes. This can lead to performance issues or wkhtml to crash. An already existing qweb widget is now used, where possible, to include barcodes images as inline base64. With this commit, the web widget is a bit improved to accept attributes for the genrated image tag. Each option dictionary key starting with `img_` will be converted into a tag attribute with the corresponding value. e.g.: `'img_alt': 'Barcode'` will result in `<img alt="Barcode"...` Also, the `quiet` reportlab option is also avalaible in the widget options. Finally, if the `symbology` option is not given, the widget will try to guess the right symbology based on barcode length and defaulting to `Code128`. This will avoid to use some logic in templates.
This update improves the website editor by making website form fields easier to configure. Business users can set default values, add field descriptions, and use improved date/time controls, helping create clearer and more useful online forms.
Inventory valuation accounting entries are now created and posted in batches instead of one at a time. This significantly reduces the time needed to process large inventory adjustments for automatically valued products, improving operational efficiency during stock corrections.
Original PR description
## Context 5300 layers having a negative `remaining_value` (as well as negative `remaining_qty`) on fifo automated products ## Test Validate an inventory adjustment to set quantities to 0. Please find below the metrics | | Before the patch | After the patch | |---|---|---| |100 products | 2000 sec | 90 sec | |1 product | 132 sec | 25 sec | On following flamegraphs, we can see the account move creation (bloc **1**) decreases significantly while the `_run_fifo_vacuum` (bloc **2**) takes more time inside the complete transaction as the batch is done *per*-product ### Before the patch :  ### After the patch : 
Event registration badges now generate barcodes directly in the report instead of making many separate barcode requests. This improves performance and reliability when printing badges for large events.
Original PR description
Use the qweb barcode widget to print event registration badges. When using the `/report/barcode/` route with a lot of records, performances issues could arrise as whktmltopdf will make a lot of requests to get the barcodes.