diff --git a/addons/delivery/delivery_view.xml b/addons/delivery/delivery_view.xml index 2d5d3692f9e..5383f9a26ba 100644 --- a/addons/delivery/delivery_view.xml +++ b/addons/delivery/delivery_view.xml @@ -137,18 +137,43 @@ - - delivery.stock.picking_withcarrier.form.view form stock.picking - + - - - + + + + + + + + delivery.stock.picking_withcarrier.out.form.view + form + stock.picking + + + + + + + + + + + + delivery.stock.picking_withcarrier.delivery.form.view + form + stock.picking + + + + + + diff --git a/addons/stock/stock.py b/addons/stock/stock.py index f5215d98f01..53bb1f069f3 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -85,13 +85,14 @@ class stock_location(osv.osv): 'chained_location_id': fields.many2one('stock.location', 'Chained Location If Fixed'), 'chained_location_type': fields.selection([('','None'),('customer', 'Customer'),('fixed','Fixed Location')], 'Chained Location Type'), + 'chained_auto_packing': fields.boolean('Chained Auto-Packing'), 'address_id': fields.many2one('res.partner.address', 'Location Address'), 'comment': fields.text('Additional Information'), 'posx': fields.integer('Corridor (X)', required=True), 'posy': fields.integer('Shelves (Y)', required=True), - 'posz': fields.integer('Height (Z)', required=True) + 'posz': fields.integer('Height (Z)', required=True), } _defaults = { 'active': lambda *a: 1, @@ -114,9 +115,9 @@ class stock_location(osv.osv): def picking_type_get(self, cr, uid, from_location, to_location, context={}): result = 'internal' - if (to_location and to_location.usage=='customer'): + if (from_location.usage=='internal') and (to_location and to_location.usage in ('customer','supplier')): result = 'delivery' - elif from_location.usage=='supplier': + elif (from_location.usage in ('supplier','customer')) and (to_location.usage=='internal'): result = 'in' return result @@ -445,7 +446,9 @@ class stock_picking(osv.osv): 'type': ptype, 'note': picking.note, 'move_type': picking.move_type, - 'address_id': picking.address_id.id + 'auto_picking': todo[0].location_dest_id.chained_auto_packing, + 'address_id': picking.address_id.id, + 'invoice_state': 'none' }) for move in todo: loc = self.pool.get('stock.location').chained_location_get(cr, uid, move.location_dest_id, picking.address_id.partner_id, move.product_id).id diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 727bfce98c6..fde00df7ddc 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -1,9 +1,10 @@ - - + + ============================= Inventory Line @@ -75,21 +76,25 @@ + Physical Inventory ir.actions.act_window stock.inventory form - + + Inventory Lines ir.actions.act_window stock.inventory.line form tree,form - + ============================= @@ -123,13 +128,16 @@ + Tracking Lots ir.actions.act_window stock.tracking form - - + + stock.tracking.tree @@ -145,42 +153,6 @@ - - stock.production.lot.revision.form stock.production.lot.revision @@ -238,12 +210,15 @@ + Production Lots ir.actions.act_window stock.production.lot form - + # @@ -353,6 +328,7 @@ + @@ -380,12 +356,16 @@ + Locations stock.location ir.actions.act_window form - + stock.location.tree @@ -400,13 +380,17 @@ + Locations Structure stock.location ir.actions.act_window [('location_id','=',False)] tree - + ============================= Warehouse @@ -441,12 +425,16 @@ + Warehouses stock.warehouse ir.actions.act_window form - + ============================= Packing @@ -540,6 +528,88 @@ + # + # Delivery Orders + # + + + stock.picking.delivery.tree + stock.picking + tree + + + + + + + + + + + + stock.picking.delivery.form + stock.picking + form + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +