diff --git a/addons/delivery/delivery_view.xml b/addons/delivery/delivery_view.xml index 5e54f74f7f1..3cbe3f1f2c7 100644 --- a/addons/delivery/delivery_view.xml +++ b/addons/delivery/delivery_view.xml @@ -183,6 +183,14 @@ + + + + + + + + @@ -196,6 +204,10 @@ + + + + @@ -211,19 +223,6 @@ - - stock.picking_withweight.internal.move.form.view - form - stock.picking - - - - - - - - - stock.move.form.weight form @@ -280,6 +279,23 @@ - + + + delivery.stock.picking_withcarrier.in.form.view + form + stock.picking.in + + + + + + + + + + + + + diff --git a/addons/delivery/stock.py b/addons/delivery/stock.py index 64ebf0ff9fa..a50226cb583 100644 --- a/addons/delivery/stock.py +++ b/addons/delivery/stock.py @@ -202,5 +202,33 @@ 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 a279b8bea6c..077d1b0719f 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2841,7 +2841,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