优化制造订单报废向导
This commit is contained in:
@@ -918,7 +918,7 @@ class MrpProduction(models.Model):
|
||||
logging.info('get_new_program error:%s' % e)
|
||||
raise UserError("从云平台获取最新程序失败,请联系管理员")
|
||||
|
||||
def recreateManufacturing(self):
|
||||
def recreateManufacturing(self, item):
|
||||
"""
|
||||
重新生成制造订单
|
||||
"""
|
||||
@@ -930,7 +930,7 @@ class MrpProduction(models.Model):
|
||||
values)
|
||||
# self.env['stock.move'].sudo().create(productions._get_moves_raw_values())
|
||||
self.env['stock.move'].sudo().create(productions._get_moves_finished_values())
|
||||
productions._create_workorder()
|
||||
productions._create_workorder(item)
|
||||
productions.filtered(lambda p: (not p.orderpoint_id and p.move_raw_ids) or \
|
||||
(
|
||||
p.move_dest_ids.procure_method != 'make_to_order' and
|
||||
@@ -1023,6 +1023,7 @@ class MrpProduction(models.Model):
|
||||
'product_id': productions.product_id.id,
|
||||
'state': 'draft',
|
||||
})
|
||||
return productions
|
||||
|
||||
# 在之前的销售单上重新生成制造订单
|
||||
def create_production1_values(self, production, sale_order):
|
||||
|
||||
Reference in New Issue
Block a user