Mayur Maheshwari(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-stock_Production_lots_traceability-mma 
into lp:openobject-addons.

Requested reviews:
  Rucha (Open ERP) (rpa-openerp)
Related bugs:
  Bug #920841 in OpenERP Addons: "when i use upstream traceability of warehouse 
product lot"
  https://bugs.launchpad.net/openobject-addons/+bug/920841

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-stock_Production_lots_traceability-mma/+merge/89832

Hello,

       stock:set view_id in traceability 

Thanks.
MMA
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-stock_Production_lots_traceability-mma/+merge/89832
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-stock_Production_lots_traceability-mma.
=== modified file 'stock/wizard/stock_traceability.py'
--- stock/wizard/stock_traceability.py	2011-12-22 06:06:59 +0000
+++ stock/wizard/stock_traceability.py	2012-01-24 06:40:33 +0000
@@ -47,7 +47,8 @@
         obj = self.pool.get('stock.move')
         ids = obj.search(cr, uid, [(field, 'in',lot_id)])
         cr.execute('select id from ir_ui_view where model=%s and field_parent=%s and type=%s', ('stock.move', type1, 'tree'))
-        view_id = cr.fetchone()[0]
+        view_id = cr.fetchone()
+        view_id = view_id and view_id[0] or 0.0
         value = {
             'domain': "[('id','in',["+','.join(map(str, ids))+"])]",
             'name': ((type1=='move_history_ids2') and _('Upstream Traceability')) or _('Downstream Traceability'),

_______________________________________________
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