Merge pull request #793 from odoo-dev/master-wmsmrpdbchange-jco

[IMP] Put produce_delay and track_production on product_template
This commit is contained in:
Josse Colpaert 2014-06-26 19:08:41 +02:00
commit 864e94a1dc
1 changed files with 8 additions and 7 deletions

View File

@ -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,
}