diff --git a/addons/delivery/delivery_view.xml b/addons/delivery/delivery_view.xml index 9d4fe1797fe..52cd58d571e 100644 --- a/addons/delivery/delivery_view.xml +++ b/addons/delivery/delivery_view.xml @@ -230,6 +230,14 @@ + + + + + + + + @@ -242,6 +250,10 @@ + + + + @@ -314,6 +326,22 @@ - + + + delivery.stock.picking_withcarrier.in.form.view + form + stock.picking.in + + + + + + + + + + + + diff --git a/addons/delivery/stock.py b/addons/delivery/stock.py index f4d133e967a..c3ce236dc2e 100644 --- a/addons/delivery/stock.py +++ b/addons/delivery/stock.py @@ -202,5 +202,30 @@ class stock_picking_out(osv.osv): 'carrier_tracking_ref': fields.char('Carrier Tracking Ref', size=32), 'number_of_packages': fields.integer('Number of Packages'), } +stock_picking_out() + +class stock_picking_in(osv.osv): + _inherit = 'stock.picking.in' + + def _cal_weight(self, cr, uid, ids, name, args, context=None): + return self.pool.get('stock.picking')._cal_weight(cr, uid, ids, name, args, context=context) + + def _get_picking_line(self, cr, uid, ids, context=None): + return self.pool.get('stock.picking')._get_picking_line(cr, uid, ids, context=context) + + _columns = { + 'weight': fields.function(_cal_weight, type='float', string='Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight', + store={ + 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20), + 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20), + }), + 'weight_net': fields.function(_cal_weight, type='float', string='Net Weight', digits_compute= dp.get_precision('Stock Weight'), multi='_cal_weight', + store={ + 'stock.picking': (lambda self, cr, uid, ids, c={}: ids, ['move_lines'], 20), + 'stock.move': (_get_picking_line, ['product_id','product_qty','product_uom','product_uos_qty'], 20), + }), + } +stock_picking_in() + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 24c19602959..6940aea48c0 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -3012,7 +3012,7 @@ class stock_picking_in(osv.osv): _name = "stock.picking.in" _inherit = "stock.picking" _table = "stock_picking" - _description = "Incomming Shipments" + _description = "Incoming Shipments" def check_access_rights(self, cr, uid, operation, raise_exception=True): #override in order to redirect the check of acces rights on the stock.picking object