diff --git a/addons/stock/product.py b/addons/stock/product.py index 5341e80fb09..cc2311b48f6 100644 --- a/addons/stock/product.py +++ b/addons/stock/product.py @@ -327,11 +327,64 @@ class product_product(osv.osv): return res _columns = { - 'qty_available': fields.function(_product_available, type='float', string='Quantity On Hand', help="Current quantities of products in selected locations or all internal if none have been selected.", multi='qty_available', digits_compute=dp.get_precision('Product UoM')), - 'virtual_available': fields.function(_product_available, type='float', string='Quantity Available', help="Forcasted quantity (computed as Quantity On Hand - Outgoing + Incoming) in selected locations or all internal if none have been selected.", multi='qty_available', digits_compute=dp.get_precision('Product UoM')), - 'incoming_qty': fields.function(_product_available, type='float', string='Incoming', help="Quantities of products that are planned to arrive in selected locations or all internal if none have been selected.", multi='qty_available', digits_compute=dp.get_precision('Product UoM')), - 'outgoing_qty': fields.function(_product_available, type='float', string='Outgoing', help="Quantities of products that are planned to leave in selected locations or all internal if none have been selected.", multi='qty_available', digits_compute=dp.get_precision('Product UoM')), - 'track_production': fields.boolean('Track Manufacturing Lots' , help="Forces to specify a Production Lot for all moves containing this product and generated by a Manufacturing Order"), + 'qty_available': fields.function(_product_available, multi='qty_available', + type='float', digits_compute=dp.get_precision('Product UoM'), + string='Quantity On Hand', + help="Current quantity of products.\n" + "In a context with a single Stock Location, this includes " + "goods stored at this Location, or any of its children.\n" + "In a context with a single Warehouse, this includes " + "goods stored in the Stock Location of this Warehouse, or any " + "of its children.\n" + "In a context with a single Shop, this includes goods " + "stored in the Stock Location of the Warehouse of this Shop, " + "or any of its children.\n" + "Otherwise, this includes goods stored in any Stock Location " + "typed as 'internal'."), + 'virtual_available': fields.function(_product_available, multi='qty_available', + type='float', digits_compute=dp.get_precision('Product UoM'), + string='Quantity Available', + help="Forcasted quantity (computed as Quantity On Hand " + "- Outgoing + Incoming)\n" + "In a context with a single Stock Location, this includes " + "goods stored at this Location, or any of its children.\n" + "In a context with a single Warehouse, this includes " + "goods stored in the Stock Location of this Warehouse, or any " + "of its children.\n" + "In a context with a single Shop, this includes goods " + "stored in the Stock Location of the Warehouse of this Shop, " + "or any of its children.\n" + "Otherwise, this includes goods stored in any Stock Location " + "typed as 'internal'."), + 'incoming_qty': fields.function(_product_available, multi='qty_available', + type='float', digits_compute=dp.get_precision('Product UoM'), + string='Incoming', + help="Quantity of products that are planned to arrive.\n" + "In a context with a single Stock Location, this includes " + "goods arriving to this Location, or any of its children.\n" + "In a context with a single Warehouse, this includes " + "goods arriving to the Stock Location of this Warehouse, or " + "any of its children.\n" + "In a context with a single Shop, this includes goods " + "arriving to the Stock Location of the Warehouse of this " + "Shop, or any of its children.\n" + "Otherwise, this includes goods arriving to any Stock " + "Location typed as 'internal'."), + 'outgoing_qty': fields.function(_product_available, multi='qty_available', + type='float', digits_compute=dp.get_precision('Product UoM'), + string='Outgoing', + help="Quantity of products that are planned to leave.\n" + "In a context with a single Stock Location, this includes " + "goods leaving from this Location, or any of its children.\n" + "In a context with a single Warehouse, this includes " + "goods leaving from the Stock Location of this Warehouse, or " + "any of its children.\n" + "In a context with a single Shop, this includes goods " + "leaving from the Stock Location of the Warehouse of this " + "Shop, or any of its children.\n" + "Otherwise, this includes goods leaving from any Stock " + "Location typed as 'internal'."), + 'track_production': fields.boolean('Track Manufacturing Lots', help="Forces to specify a Production Lot for all moves containing this product and generated by a Manufacturing Order"), 'track_incoming': fields.boolean('Track Incoming Lots', help="Forces to specify a Production Lot for all moves containing this product and coming from a Supplier Location"), 'track_outgoing': fields.boolean('Track Outgoing Lots', help="Forces to specify a Production Lot for all moves containing this product and going to a Customer Location"), 'location_id': fields.dummy(string='Location', relation='stock.location', type='many2one'),