Wednesday, December 22, 2021
2 changes · master
Code cleanup and technical improvements
This update reorganizes how file uploads are handled in the Mail app, including activities, attachment boxes, and message composers. It should make upload behavior easier to maintain and support more consistent attachment handling for users.
Manufacturing orders with multiple serial numbers are now split in batches instead of one by one, greatly reducing processing time for large production runs. The change also adds a warning when mass producing with components from multiple lots, helping users confirm the action is intentional.
Original PR description
There is 2 major issues with the production of multiple serials number - Performance issue - Duplicated code with classic backorder mechanism The performance issues exist since backorders were create…
There is 2 major issues with the production of multiple serials number - Performance issue - Duplicated code with classic backorder mechanism The performance issues exist since backorders were create one by one and `stock.move` and `stock.move.line` are always recomputed. They are not created in batch neither. _generate_backorders is removed and replace by _split_productions. The functionality are the same. Technicaly it does the maximum in batch, first it creates all the `mrp.production` then all the `stock.move` and finaly, it splits the existing `stock.move.line` among the new `stock.move` It means that the reservation is not recompute anymore during a backorder process and will remain the same than the splitted production order. Performance metrics (10 components): | # | 2 | 10 | 100 | 1000 | |----------|------------|----------|----------|-------------| | Before | 0.47s | 2.84s | 32.25s | 580.53s | | After | 0.13s | 0.36s | 2.60s | 35.17s | task 2633369