openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #02453
Re: lp:~camptocamp/carriers-deliveries/7.0-add-base_delivery_carrier_label-yvr into lp:carriers-deliveries
Review: Needs Fixing
I get this error:
Traceback (most recent call last):
File "/path/to/server/openerp/netsvc.py", line 292, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/path/to/server/openerp/service/web_services.py", line 626, in dispatch
res = fn(db, uid, *params)
File "/path/to/server/openerp/osv/osv.py", line 188, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/path/to/server/openerp/osv/osv.py", line 131, in wrapper
return f(self, dbname, *args, **kwargs)
File "/path/to/server/openerp/osv/osv.py", line 197, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/path/to/server/openerp/osv/osv.py", line 185, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/path/to/carriers-deliveries/base_delivery_carrier_label/stock.py", line 245, in action_generate_carrier_label
File "/path/to/carriers-deliveries/base_delivery_carrier_label/stock.py", line 99, in action_generate_carrier_label
'res_id': pick.id,
TypeError: 'type' object is unsubscriptable
When I use the button "Create Shipping Label" on a delivery order whose delivery method has no label configured.
The problem is in action_generate_carrier_label() which calls generate_shipping_labels() which returns a list with the result of calls generate_default_label(), the latter returning a NotImplementedError (it returns the type, it does not raise). I propose to raise an orm.except_orm error in generate_default_label() when there is no label configured instead of returning an Exception type.
--
https://code.launchpad.net/~camptocamp/carriers-deliveries/7.0-add-base_delivery_carrier_label-yvr/+merge/196753
Your team Stock and Logistic Core Editors is subscribed to branch lp:carriers-deliveries.
References