Mayur Maheshwari(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-915541-mma into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #915541 in OpenERP Addons: "[Trunk] Procurement request leads to server
crash"
https://bugs.launchpad.net/openobject-addons/+bug/915541
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-915541-mma/+merge/88847
Hello,
procurement: added read method instead of browse method
Thanks.
MMA
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-915541-mma/+merge/88847
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-915541-mma.
=== modified file 'procurement/schedulers.py'
--- procurement/schedulers.py 2011-12-23 15:23:43 +0000
+++ procurement/schedulers.py 2012-01-17 12:46:25 +0000
@@ -180,10 +180,11 @@
for warehouse in warehouse_obj.browse(cr, uid, warehouse_ids, context=context):
context['warehouse'] = warehouse
- for product in product_obj.browse(cr, uid, products_id, context=context):
- if product.virtual_available >= 0.0:
+ for product_availability in product_obj.read(cr, uid, products_id, ['virtual_available'], context=context):
+ if product_availability['virtual_available'] >= 0.0:
continue
+ product = product_obj.browse(cr, uid, [product_availability['id']], context=context)[0]
if product.supply_method == 'buy':
location_id = warehouse.lot_input_id.id
elif product.supply_method == 'produce':
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp