return res
_columns = {
++<<<<<<< HEAD
+ '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"),
++=======
++>>>>>>> odoo/8.0
'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,
}
++<<<<<<< HEAD
+
+ _defaults = {
+ "produce_delay": 1,
+ }
+
+ def copy(self, cr, uid, id, default=None, context=None):
+ if not default:
+ default = {}
+ default.update({
+ 'bom_ids': []
+ })
+ return super(product_template, self).copy(cr, uid, id, default, context=context)
++=======
++>>>>>>> odoo/8.0
class product_product(osv.osv):
_inherit = "product.product"
_columns = {
'mo_count': fields.function(_bom_orders_count, string='# Manufacturing Orders', type='integer'),
}
++<<<<<<< HEAD
++=======
+
++>>>>>>> odoo/8.0
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
def copy(self, cr, uid, id, default=None, context=None):
if not default:
default = {}
- if not default.get('split_from'):
+ if not default.get('split_from') and not context.get('split'):
#we don't want to propagate the link to the purchase order line except in case of move split
- default.update({
- 'purchase_line_id': False,
- })
+ default['purchase_line_id'] = False
return super(stock_move, self).copy(cr, uid, id, default, context)
'date_expected': fields.datetime.now,
'procure_method': 'make_to_stock',
'propagate': True,
++ 'partially_available': False,
}
def _check_uom(self, cr, uid, ids, context=None):
['product_uom']),
]
- def copy_data(self, cr, uid, id, default=None, context=None):
- if default is None:
- default = {}
- default = default.copy()
- default['quant_ids'] = []
- default['reserved_quant_ids'] = []
- default['returned_move_ids'] = []
- default['linked_move_operation_ids'] = []
- default['partially_available'] = False
- if not default.get('move_orig_ids'):
- default['move_orig_ids'] = []
- if not default.get('move_dest_id'):
- default['move_dest_id'] = False
- if not default.get('procurement_id'):
- default['procurement_id'] = False
- if not default.get('origin_returned_move_id'):
- default['origin_returned_move_id'] = False
- default['state'] = 'draft'
- return super(stock_move, self).copy_data(cr, uid, id, default, context)
- @api.cr_uid_ids_context
+
def do_unreserve(self, cr, uid, move_ids, context=None):
quant_obj = self.pool.get("stock.quant")
for move in self.browse(cr, uid, move_ids, context=context):