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/stock_fill_location_inventory.py (+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: mp+224470@code.launchpad.net

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/session.py", line 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/home/openerp/openobject-server/openerp/netsvc.py", line 296, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/openerp/openobject-server/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/home/openerp/openobject-server/openerp/osv/osv.py", line 190, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/home/openerp/openobject-server/openerp/osv/osv.py", line 132, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/openerp/openobject-server/openerp/osv/osv.py", line 199, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/openerp/openobject-server/openerp/osv/osv.py", line 187, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/openerp/stock-logistic-warehouse/stock_inventory_hierarchical_location/wizard/stock_fill_location_inventory.py", 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
1=== modified file 'stock_inventory_hierarchical_location/wizard/stock_fill_location_inventory.py'
2--- stock_inventory_hierarchical_location/wizard/stock_fill_location_inventory.py 2014-06-13 13:18:52 +0000
3+++ stock_inventory_hierarchical_location/wizard/stock_fill_location_inventory.py 2014-06-25 15:46:17 +0000
4@@ -27,7 +27,7 @@
5 #
6 #
7
8-from openerp.osv import orm
9+from openerp.osv import orm, osv
10 from openerp.tools.translate import _
11
12
13@@ -74,7 +74,7 @@
14 [self.copy(cr, uid, ids, {'location_id': location_id,
15 'recursive': False, }, context=context)],
16 context=context)
17- except Exception, e:
18+ except osv.except_osv, e:
19 if e.value == _('No product in this location. Please select a location in the product form.'):
20 all_in_exception = all_in_exception + 1
21 pass

Subscribers

People subscribed via source and target branches