Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/优化最新版返工

# Conflicts:
#	sf_manufacturing/views/mrp_workorder_view.xml
This commit is contained in:
jinling.yang
2024-07-11 17:38:38 +08:00
173 changed files with 14467 additions and 297 deletions

View File

@@ -165,7 +165,8 @@ class ResMrpWorkOrder(models.Model):
保存名称
"""
for record in self:
record.save_name = record.production_id.name.replace('/', '_')
tem_name = record.production_id.name.replace('/', '_')
record.save_name = tem_name + '_' + record.processing_panel
schedule_state = fields.Selection(related='production_id.schedule_state', store=True)
# 工件装夹信息
@@ -1039,7 +1040,7 @@ class ResMrpWorkOrder(models.Model):
move_raw_id.quantity_done = move_raw_id.product_uom_qty
record.process_state = '已完工'
record.production_id.process_state = '已完工'
if record.routing_type in ['解除装夹', '表面工艺']:
if record.routing_type in ['表面工艺']:
raw_move = self.env['stock.move'].sudo().search(
[('origin', '=', record.production_id.name),
('procure_method', 'in', ['make_to_order', 'make_to_stock']),
@@ -1115,6 +1116,16 @@ class ResMrpWorkOrder(models.Model):
# logging.info('button_send_program_again error:%s' % e)
# raise UserError("重新下发nc程序失败,请联系管理员")
def print_method(self):
"""
解除装夹处调用关联制造订单的关联序列号的打印方法
"""
if self.production_id:
if self.production_id.lot_producing_id:
self.production_id.lot_producing_id.print_single_method()
else:
raise UserError("无关联制造订单或关联序列号,无法打印。请检查!")
class CNCprocessing(models.Model):
_name = 'sf.cnc.processing'