diff --git a/addons/sale_stock_location/sale_stock_location.py b/addons/sale_stock_location/sale_stock_location.py index 6afa8020913..6cbde59ef2d 100644 --- a/addons/sale_stock_location/sale_stock_location.py +++ b/addons/sale_stock_location/sale_stock_location.py @@ -48,10 +48,16 @@ class sale_order(osv.osv): class sale_order_line(osv.osv): _inherit = 'sale.order.line' _columns = { - 'route_id': fields.many2one('stock.location.route', 'Route'), + 'route_id': fields.many2one('stock.location.route', 'Route', domain=[('sale', '=', True)]), } +class stock_location_route(osv.osv): + _inherit = "stock.location.route" + _columns = { + 'sale':fields.boolean("Can be set on sale order line") + } + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sale_stock_location/sale_stock_location_view.xml b/addons/sale_stock_location/sale_stock_location_view.xml index 35bfde30dda..3d59828424c 100644 --- a/addons/sale_stock_location/sale_stock_location_view.xml +++ b/addons/sale_stock_location/sale_stock_location_view.xml @@ -34,5 +34,16 @@ + + + stock.location.route.form + + stock.location.route + + + + + + diff --git a/addons/stock/stock.py b/addons/stock/stock.py index a4096bd8af6..c3d36c9dfa3 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1676,11 +1676,6 @@ class stock_move(osv.osv): #If no other moves for the move that got pushed: if not other_upstream_move_ids and move.move_dest_id.state in ('waiting', 'confirmed'): self.action_assign(cr, uid, [move.move_dest_id.id], context=context) - -# quants = quant_obj.search(cr, uid, [('history_ids', 'in', move.id), ('location_id', '=', move.location_dest_id.id), ('reservation_id', '=', False)], context=context) -# if quants: -# quant_obj.write(cr, uid, quants, {'reservation_id':move.move_dest_id.id}, context=context) - self.write(cr, uid, ids, {'state': 'done', 'date': time.strftime(DEFAULT_SERVER_DATETIME_FORMAT)}, context=context) if move.picking_id: diff --git a/addons/stock_complex_routes/stock_complex_routes.xml b/addons/stock_complex_routes/stock_complex_routes.xml index c3a3cf14364..7ba10ea7add 100644 --- a/addons/stock_complex_routes/stock_complex_routes.xml +++ b/addons/stock_complex_routes/stock_complex_routes.xml @@ -5,6 +5,7 @@ Drop Shipping 3 + True