Merge lp:~acsone-openerp/stock-logistic-warehouse/7.0-inventory-hierarchical-location-exception-fil-inventory-lga into lp:~numerigraphe-team/stock-logistic-warehouse/7.0-inventory-hierarchical

Proposed by Laetitia Gangloff (Acsone)
Status: Merged
Merged at revision: 42
Proposed branch: lp:~acsone-openerp/stock-logistic-warehouse/7.0-inventory-hierarchical-location-exception-fil-inventory-lga
Merge into: lp:~numerigraphe-team/stock-logistic-warehouse/7.0-inventory-hierarchical
Diff against target: 21 lines (+2/-2)
1 file modified
stock_inventory_hierarchical_location/wizard/ (+2/-2)
To merge this branch: bzr merge lp:~acsone-openerp/stock-logistic-warehouse/7.0-inventory-hierarchical-location-exception-fil-inventory-lga
Reviewer Review Type Date Requested Status
Numérigraphe Pending
Review via email:

Description of the change

Following the discover of Loïc Bellier / Numérigraphe :

Server Traceback (most recent call last):
  File "/home/openerp/openerp-web/addons/web/", line 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/home/openerp/openobject-server/openerp/", line 296, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/openerp/openobject-server/openerp/service/", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/home/openerp/openobject-server/openerp/osv/", line 190, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/home/openerp/openobject-server/openerp/osv/", line 132, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/openerp/openobject-server/openerp/osv/", line 199, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/openerp/openobject-server/openerp/osv/", line 187, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/openerp/stock-logistic-warehouse/stock_inventory_hierarchical_location/wizard/", line 78, in fill_inventory
    if e.value == _('No product in this location. Please select a location in the product form.'):
AttributeError: 'exceptions.Exception' object has no attribute 'value'

I correct the problem by changing the type of exception.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'stock_inventory_hierarchical_location/wizard/'
--- stock_inventory_hierarchical_location/wizard/ 2014-06-13 13:18:52 +0000
+++ stock_inventory_hierarchical_location/wizard/ 2014-06-25 15:46:17 +0000
@@ -27,7 +27,7 @@
30from openerp.osv import orm30from openerp.osv import orm, osv
31from import _31from import _
@@ -74,7 +74,7 @@
74 [self.copy(cr, uid, ids, {'location_id': location_id,74 [self.copy(cr, uid, ids, {'location_id': location_id,
75 'recursive': False, }, context=context)],75 'recursive': False, }, context=context)],
76 context=context)76 context=context)
77 except Exception, e:77 except osv.except_osv, e:
78 if e.value == _('No product in this location. Please select a location in the product form.'):78 if e.value == _('No product in this location. Please select a location in the product form.'):
79 all_in_exception = all_in_exception + 179 all_in_exception = all_in_exception + 1
80 pass80 pass


People subscribed via source and target branches