diff --git a/addons/product/product.py b/addons/product/product.py index 5b1d100fc8b..41a928dc50a 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -214,10 +214,14 @@ class product_uom(osv.osv): class product_ul(osv.osv): _name = "product.ul" - _description = "Shipping Unit" + _description = "Logistic Unit" _columns = { 'name' : fields.char('Name', select=True, required=True, translate=True), 'type' : fields.selection([('unit','Unit'),('pack','Pack'),('box', 'Box'), ('pallet', 'Pallet')], 'Type', required=True), + 'height': fields.float('Height', help='The height of the package'), + 'width': fields.float('Width', help='The width of the package'), + 'length': fields.float('Length', help='The length of the package'), + 'weight': fields.float('Empty Package Weight'), } @@ -724,7 +728,7 @@ class product_product(osv.osv): 'is_only_child': fields.function( _is_only_child, type='boolean', string='Sole child of the parent template'), 'ean13': fields.char('EAN13 Barcode', size=13, help="International Article Number used for product identification."), - 'packaging': fields.one2many('product.packaging', 'product_id', 'Logistical Units', help="Gives the different ways to package the same product. This has no impact on the picking order and is mainly used if you use the EDI module."), + 'packaging': fields.one2many('product.packaging', 'product_id', 'Packaging', help="Gives the different ways to package the same product. This has no impact on the picking order and is mainly used if you use the EDI module."), 'price_extra': fields.float('Variant Price Extra', digits_compute=dp.get_precision('Product Price'), help="Price Extra: Extra price for the variant on sale price. eg. 200 price extra, 1000 + 200 = 1200."), 'price_margin': fields.float('Variant Price Margin', digits_compute=dp.get_precision('Product Price'), help="Price Margin: Margin in percentage amount on sale price for the variant. eg. 10 price margin, 1000 * 1.1 = 1100."), 'pricelist_id': fields.dummy(string='Pricelist', relation='product.pricelist', type='many2one'), @@ -937,8 +941,9 @@ class product_packaging(osv.osv): 'name' : fields.text('Description'), 'qty' : fields.float('Quantity by Package', help="The total number of products you can put by pallet or box."), - 'ul' : fields.many2one('product.ul', 'Type of Package', required=True), + 'ul' : fields.many2one('product.ul', 'Package Logistic Unit', required=True), 'ul_qty' : fields.integer('Package by layer', help='The number of packages by layer'), + 'ul_container': fields.many2one('product.ul', 'Pallet Logistic Unit'), 'rows' : fields.integer('Number of Layers', required=True, help='The number of layers on a pallet or box'), 'product_id' : fields.many2one('product.product', 'Product', select=1, ondelete='cascade', required=True), @@ -946,13 +951,8 @@ class product_packaging(osv.osv): 'code' : fields.char('Code', help="The code of the transport unit."), 'weight': fields.float('Total Package Weight', help='The weight of a full package, pallet or box.'), - 'weight_ul': fields.float('Empty Package Weight'), - 'height': fields.float('Height', help='The height of the package'), - 'width': fields.float('Width', help='The width of the package'), - 'length': fields.float('Length', help='The length of the package'), } - def _check_ean_key(self, cr, uid, ids, context=None): for pack in self.browse(cr, uid, ids, context=context): res = check_ean(pack.ean) diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml index 67e9be40286..f91961c8797 100644 --- a/addons/product/product_view.xml +++ b/addons/product/product_view.xml @@ -171,8 +171,8 @@ attrs="{'readonly': [('is_only_child', '=', False)]}"/> - + +
@@ -180,15 +180,11 @@ - + - - - - @@ -579,11 +575,17 @@ product.ul.form.view product.ul - + + + + + + + @@ -591,25 +593,25 @@ product.ul.tree product.ul - + - Packaging + Logistic Units ir.actions.act_window product.ul form tree,form

- Click to add a new packaging type. + Click to add a new Logistic Unit

- The packaging type define the dimensions as well as the number - of products per package. This will ensure salesperson sell the - right number of products according to the package selected. + The logistic unit defines the container used for the package. + It has a type (e.g. pallet, box, ...) and you can specify its + size.

@@ -625,6 +627,7 @@ + @@ -642,15 +645,11 @@ - + - - - - diff --git a/addons/product_expiry/product_expiry_demo.xml b/addons/product_expiry/product_expiry_demo.xml index 237f70fc80b..bb5d4ac92de 100644 --- a/addons/product_expiry/product_expiry_demo.xml +++ b/addons/product_expiry/product_expiry_demo.xml @@ -19,6 +19,7 @@ + box of 10 12 @@ -28,7 +29,6 @@ 10 - 240 @@ -57,7 +57,6 @@ 10 - 240 @@ -86,7 +85,6 @@ 10 - 240 @@ -115,7 +113,6 @@ 10 - 240 diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 9798c4e24fd..89280600b7b 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -3506,7 +3506,8 @@ class stock_package(osv.osv): 'complete_name': fields.function(_complete_name, type='char', string="Package Name",), 'parent_left': fields.integer('Left Parent', select=1), 'parent_right': fields.integer('Right Parent', select=1), - 'packaging_id': fields.many2one('product.packaging', 'Type of Packaging'), + 'packaging_id': fields.many2one('product.packaging', 'Packaging', help="This field should be completed only if everything inside the package share the same product, otherwise it doesn't really makes sense."), + 'ul_id': fields.many2one('product.ul', 'Logistic Unit'), 'location_id': fields.function(_get_package_info, type='many2one', relation='stock.location', string='Location', multi="package", store={ 'stock.quant': (_get_packages, ['location_id'], 10), diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index c4c8cea461a..af72b9c696b 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -1716,8 +1716,8 @@ - - + + @@ -1933,7 +1933,8 @@ - + + @@ -1941,7 +1942,6 @@ - @@ -1962,6 +1962,7 @@ + @@ -1969,7 +1970,6 @@ - @@ -1982,6 +1982,7 @@ + @@ -1991,11 +1992,12 @@ stock.quant.package.search stock.quant.package - + +