Validate shipment before create shipping
This ensure the shipment is still valid to create shipping for the carrier. Otherwise it raises a nice error message. issue9072 review303421002
This commit is contained in:
1 parent
b69acbca12
commit
141074c7b7
1 file changed
+5
@@ -204,4 +204,9 @@ class CreateShipping(Wizard):
|
||||
start = StateTransition()
|
||||
|
||||
def transition_start(self):
|
||||
pool = Pool()
|
||||
ShipmentOut = pool.get('stock.shipment.out')
|
||||
shipment = ShipmentOut(Transaction().context['active_id'])
|
||||
method_name = 'validate_packing_%' % shipment.carrier.shipping_service
|
||||
getattr(shipment, method_name)()
|
||||
return 'end'
|
||||
Reference in new issue
Block a user