Merge pull request #10395 from odoo-dev/saas-6-scheduler-performance-lla
[FIX] Improve performance of the scheduler.
This commit is contained in:
@@ -169,7 +169,9 @@ class product_product(osv.osv):
|
||||
moves_in = dict(map(lambda x: (x['product_id'][0], x['product_qty']), moves_in))
|
||||
moves_out = dict(map(lambda x: (x['product_id'][0], x['product_qty']), moves_out))
|
||||
res = {}
|
||||
for product in self.browse(cr, uid, ids, context=context):
|
||||
ctx = context.copy()
|
||||
ctx.update({'prefetch_fields': False})
|
||||
for product in self.browse(cr, uid, ids, context=ctx):
|
||||
id = product.id
|
||||
qty_available = float_round(quants.get(id, 0.0), precision_rounding=product.uom_id.rounding)
|
||||
incoming_qty = float_round(moves_in.get(id, 0.0), precision_rounding=product.uom_id.rounding)
|
||||
|
||||
Reference in New Issue
Block a user