From 82664ba614339bbe04e9ea653d38a5056ac11425 Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Thu, 26 Jun 2014 18:12:10 +0200 Subject: [PATCH] [IMP] Put produce_delay and track_production on product_template --- addons/mrp/product.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/addons/mrp/product.py b/addons/mrp/product.py index 97ef9cf0494..2c3ae955f24 100644 --- a/addons/mrp/product.py +++ b/addons/mrp/product.py @@ -41,10 +41,17 @@ class product_template(osv.osv): return res _columns = { - "bom_ids": fields.one2many('mrp.bom', 'product_tmpl_id','Bill of Materials'), + 'bom_ids': fields.one2many('mrp.bom', 'product_tmpl_id','Bill of Materials'), 'bom_count': fields.function(_bom_orders_count, string='# Bill of Material', type='integer', multi="_bom_order_count"), 'mo_count': fields.function(_bom_orders_count_mo, string='# Manufacturing Orders', type='integer'), + 'produce_delay': fields.float('Manufacturing Lead Time', help="Average delay in days to produce this product. In the case of multi-level BOM, the manufacturing lead times of the components will be added."), + 'track_production': fields.boolean('Track Manufacturing Lots', help="Forces to specify a Serial Number for all moves containing this product and generated by a Manufacturing Order"), } + + _defaults = { + "produce_delay": 1, + } + def copy(self, cr, uid, id, default=None, context=None): if not default: default = {} @@ -63,14 +70,8 @@ class product_product(osv.osv): return res _columns = { - "produce_delay": fields.float('Manufacturing Lead Time', help="Average delay in days to produce this product. In the case of multi-level BOM, the manufacturing lead times of the components will be added."), - 'track_production': fields.boolean('Track Manufacturing Lots', help="Forces to specify a Serial Number for all moves containing this product and generated by a Manufacturing Order"), 'mo_count': fields.function(_bom_orders_count, string='# Manufacturing Orders', type='integer'), } - - _defaults = { - "produce_delay": 1, - }