Hiral Patel (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-1081193-hip into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #921561 in OpenERP Addons: "Product function fields should return 0 when 
no locations are defined"
  https://bugs.launchpad.net/openobject-addons/+bug/921561
  Bug #1081193 in OpenERP Addons: "Trunk/6.1 stock - Error in new company"
  https://bugs.launchpad.net/openobject-addons/+bug/1081193

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1081193-hip/+merge/139389

Hello,

Steps to reproduce this bug:
1. create a company(X) without any parent company
2. create a user for this company
3. Warehouse module is needed to be installed.
4. Then login with this user and click on product menu. Error will be generated.


Thanks,
hip
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1081193-hip/+merge/139389
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-1081193-hip.
=== modified file 'stock/product.py'
--- stock/product.py	2012-11-29 22:26:45 +0000
+++ stock/product.py	2012-12-12 07:03:22 +0000
@@ -235,6 +235,8 @@
         else:
             location_ids = []
             wids = warehouse_obj.search(cr, uid, [], context=context)
+            if not wids:
+                return res
             for w in warehouse_obj.browse(cr, uid, wids, context=context):
                 location_ids.append(w.lot_stock_id.id)
 

_______________________________________________
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

Reply via email to