From dc25eac8d46fe37f9cd956ab5dd831e1a1b22d88 Mon Sep 17 00:00:00 2001 From: Martin Geubelle Date: Fri, 18 Dec 2015 11:59:36 +0100 Subject: [PATCH] [FIX] sale_stock: replace except_orm exception by UserError As the raise of this `except_orm` exception has been replaced by a `UserError` from revision 0fd773a opw-658566 --- addons/sale_stock/sale_stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale_stock/sale_stock.py b/addons/sale_stock/sale_stock.py index 8f2c32a2cb5..31102cd955f 100644 --- a/addons/sale_stock/sale_stock.py +++ b/addons/sale_stock/sale_stock.py @@ -290,7 +290,7 @@ class sale_order_line(osv.osv): else: try: mto_route_id = self.pool['stock.warehouse']._get_mto_route(cr, uid, context=context) - except osv.except_osv: + except UserError: # if route MTO not found in ir_model_data, we treat the product as in MTS mto_route_id = False if mto_route_id: