Remove improve_performance_on_try_assing.diff as it should not be necessary with recent patches that improve performance on m2o fields.
This commit is contained in:
parent
22f6a62a93
commit
38a55dbbb0
|
@ -1,34 +0,0 @@
|
|||
diff -r 988c3bc94672 trytond/trytond/modules/stock/move.py
|
||||
--- a/trytond/trytond/modules/stock/move.py Wed Oct 23 10:38:49 2019 +0200
|
||||
+++ b/trytond/trytond/modules/stock/move.py Wed Oct 23 10:53:33 2019 +0200
|
||||
@@ -1400,11 +1400,27 @@
|
||||
del quantities[key]
|
||||
|
||||
# Round quantities
|
||||
- default_uom = dict((p.id, p.default_uom) for p in
|
||||
- Model.browse(list(ids)))
|
||||
+ Uom = Pool().get('product.uom')
|
||||
+ ttemplate = Template.__table__()
|
||||
+ table = Model.__table__()
|
||||
+ cursor = Transaction().connection.cursor()
|
||||
+ if Model == Template:
|
||||
+ cursor.execute(*ttemplate.select(ttemplate.id,
|
||||
+ ttemplate.default_uom,
|
||||
+ where=reduce_ids(ttemplate.id, ids)))
|
||||
+ else:
|
||||
+ cursor.execute(*ttemplate.join(table,
|
||||
+ condition=table.template == ttemplate.id).select(
|
||||
+ table.id, ttemplate.default_uom,
|
||||
+ where=reduce_ids(table.id, ids)))
|
||||
+
|
||||
+ default_uom = dict((x[0], x[1]) for x in
|
||||
+ cursor.fetchall())
|
||||
+ uoms = dict([(x, Uom(x)) for x in set(default_uom.values())])
|
||||
+
|
||||
for key, quantity in quantities.items():
|
||||
location = key[0]
|
||||
- uom = default_uom[id_getter(key)]
|
||||
+ uom = uoms[default_uom[id_getter(key)]]
|
||||
quantities[key] = uom.round(quantity) if quantity else 0.0
|
||||
|
||||
return quantities
|
1
series
1
series
|
@ -40,7 +40,6 @@ issue4482.diff # [stock] stock inventory misses company access rule
|
|||
search_warehouse.diff # [stock] search function for warehouse
|
||||
issue239_630.diff # [stock] get location quantity by product, product template or lot
|
||||
stock_quantity_to_zero.diff # [stock] Ensure to sum with value.
|
||||
improve_performance_on_try_assign.diff # [stock] change browse of product to get default_uom to pysql
|
||||
issue8775.diff # [stock] Keep the origin of customer shipments when sync inventory to outgoing moves
|
||||
issue8775_stock_lot.diff # [stock_lot] Keep the origin of customer shipments when sync inventory to outgoing moves
|
||||
|
||||
|
|
Loading…
Reference in New Issue