diff --git a/addons/stock/procurement.py b/addons/stock/procurement.py index 23bc2f8a12f..a42cfcd1919 100644 --- a/addons/stock/procurement.py +++ b/addons/stock/procurement.py @@ -48,6 +48,8 @@ class procurement_rule(osv.osv): def _get_route(self, cr, uid, ids, context=None): result = {} + if context is None: + context = {} context_with_inactive = context.copy() context_with_inactive['active_test']=False for route in self.pool.get('stock.location.route').browse(cr, uid, ids, context=context_with_inactive): diff --git a/addons/stock/stock.py b/addons/stock/stock.py index dcdab8f7944..1fe5dba331f 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -80,6 +80,8 @@ class stock_location(osv.osv): def _get_sublocations(self, cr, uid, ids, context=None): """ return all sublocations of the given stock locations (included) """ + if context is None: + context = {} context_with_inactive = context.copy() context_with_inactive['active_test']=False return self.search(cr, uid, [('id', 'child_of', ids)], context=context_with_inactive) diff --git a/addons/stock/stock_data.xml b/addons/stock/stock_data.xml index 5f7870f3ecc..880bc1b6839 100644 --- a/addons/stock/stock_data.xml +++ b/addons/stock/stock_data.xml @@ -158,7 +158,7 @@ watch your stock valuation, and track production lots upstream and downstream (b --> - Stock → Customer + Your Company: Stock → Customer move @@ -168,12 +168,12 @@ watch your stock valuation, and track production lots upstream and downstream (b - MTO + Your Company: Ship Only (MTO) 10 - Stock → Customer + Your Company: Stock → Customer move diff --git a/addons/stock_complex_routes/stock_complex_routes.xml b/addons/stock_complex_routes/stock_complex_routes.xml index a7ae56d9a48..189b80cdfc1 100644 --- a/addons/stock_complex_routes/stock_complex_routes.xml +++ b/addons/stock_complex_routes/stock_complex_routes.xml @@ -36,25 +36,7 @@ make_to_stock - - - - - - Crossdock - - - - - - Supplier → Output - buy - - - - - - + diff --git a/addons/stock_location/stock_location.py b/addons/stock_location/stock_location.py index 1dd3e9c55b7..0df162489a6 100644 --- a/addons/stock_location/stock_location.py +++ b/addons/stock_location/stock_location.py @@ -454,6 +454,8 @@ class stock_warehouse(osv.osv): def write(self, cr, uid, ids, vals, context=None): if isinstance(ids, (int, long)): ids = [ids] + if context is None: + context = {} seq_obj = self.pool.get('ir.sequence') location_obj = self.pool.get('stock.location') route_obj = self.pool.get('stock.location.route') @@ -518,6 +520,8 @@ class stock_location_path(osv.osv): def _get_route(self, cr, uid, ids, context=None): result = {} + if context is None: + context = {} context_with_inactive = context.copy() context_with_inactive['active_test']=False for route in self.pool.get('stock.location.route').browse(cr, uid, ids, context=context_with_inactive): diff --git a/addons/stock_location/stock_location_data.xml b/addons/stock_location/stock_location_data.xml index 4b3bfb0e176..d085e19aba0 100644 --- a/addons/stock_location/stock_location_data.xml +++ b/addons/stock_location/stock_location_data.xml @@ -6,21 +6,26 @@ - Pack zone - - internal - - - - Pick zone + Packing zone internal + Input internal + + + + + + + + internal + Quality Control + - Sale: Ship only + Your Company: Ship only 20 @@ -36,13 +41,13 @@ - Stock → customer + Your Company: Stock → Customers move make_to_stock - + @@ -55,26 +60,26 @@ make_to_order - - - - MTO - 10 - --> + + Your company: Ship only (MTO) + 10 + + + - Stock → Customer + Your Company: Stock → Customers move make_to_order - + - Crossdock + Your Company: Cross-Dock 9 @@ -82,127 +87,222 @@ - Output → Customer + Your Company: Stock → Customers move - + make_to_order + + + Your Company: Stock → Stock + move + + + make_to_stock + + + - Sale: Pack + Ship + Your Company: Pick + Ship 15 + - MTO pack + Your Company: Pick + Ship (MTO) 10 + - Stock → Output + Your Company: Stock → Output move make_to_stock + - Output → Customer + Your Company: Output → Customers move make_to_order + - Stock → Output MTO + Your Company: Stock → Output move make_to_order + - Sale: Pick + Pack + Ship + Your Company: Pick + Pack + Ship 20 + + + + + Your Company: Pick + Pack + Ship (MTO) + 12 + - Stock → Pack + Your Company: Stock → Packing Zone move make_to_stock + - Output → Customer + Your Company: Output → Customers move make_to_order + - Pack → Output + Your Company: Packing Zone → Output move make_to_order + - - MTO pick - 10 - - - - Stock → Pack MTO + + Your Company: Stock → Packing Zone move make_to_order - + + - 2-step Receival + Your Company: Reception in 2 steps 20 + - Push Input → Stock + Your Company: Input → Stock + + + + + Your Company: Input → Stock + move + + + make_to_stock + + + + + + + + Your Company: Reception in 3 steps + 22 + + + + + + + Your Company: Input → Quality Control + + + + + + + + + Your Company: Quality Control → Stock + + + + + + + + + Your Company: Quality Control → Stock + move + + + make_to_order + + + + + + + Your Company: Input → Quality Control + move + + + make_to_stock + + + + + + + + + + + + + + + diff --git a/addons/stock_location/stock_location_demo_cpu1.xml b/addons/stock_location/stock_location_demo_cpu1.xml index f89a1f98002..d49e1730261 100644 --- a/addons/stock_location/stock_location_demo_cpu1.xml +++ b/addons/stock_location/stock_location_demo_cpu1.xml @@ -5,11 +5,7 @@ - - - - internal - Quality Control + True