Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 864e94a

Browse files
committed
Merge pull request odoo#793 from odoo-dev/master-wmsmrpdbchange-jco
[IMP] Put produce_delay and track_production on product_template
2 parents 032b21a + 82664ba commit 864e94a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

addons/mrp/product.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,17 @@ def _bom_orders_count_mo(self, cr, uid, ids, name, arg, context=None):
4141
return res
4242

4343
_columns = {
44-
"bom_ids": fields.one2many('mrp.bom', 'product_tmpl_id','Bill of Materials'),
44+
'bom_ids': fields.one2many('mrp.bom', 'product_tmpl_id','Bill of Materials'),
4545
'bom_count': fields.function(_bom_orders_count, string='# Bill of Material', type='integer', multi="_bom_order_count"),
4646
'mo_count': fields.function(_bom_orders_count_mo, string='# Manufacturing Orders', type='integer'),
47+
'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."),
48+
'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"),
49+
}
50+
51+
_defaults = {
52+
"produce_delay": 1,
4753
}
54+
4855
def copy(self, cr, uid, id, default=None, context=None):
4956
if not default:
5057
default = {}
@@ -63,14 +70,8 @@ def _bom_orders_count(self, cr, uid, ids, field_name, arg, context=None):
6370
return res
6471

6572
_columns = {
66-
"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."),
67-
'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"),
6873
'mo_count': fields.function(_bom_orders_count, string='# Manufacturing Orders', type='integer'),
6974
}
70-
71-
_defaults = {
72-
"produce_delay": 1,
73-
}
7475

7576

7677

0 commit comments

Comments
 (0)