修复表面工艺
This commit is contained in:
@@ -691,7 +691,7 @@ class MrpProduction(models.Model):
|
||||
# # 根据工序设计生成工单
|
||||
for route in production.technology_design_ids:
|
||||
workorder_has = self.env['mrp.workorder'].search(
|
||||
[('name', '=', route.route_id.name), ('production_id', '=', production.id)])
|
||||
[('technology_design_id', '=', route.id), ('production_id', '=', production.id)])
|
||||
if not workorder_has:
|
||||
if route.route_id.routing_type not in ['表面工艺']:
|
||||
workorders_values.append(
|
||||
@@ -1469,10 +1469,12 @@ class MrpProduction(models.Model):
|
||||
def action_view_purchase_orders(self):
|
||||
self.ensure_one()
|
||||
if self.product_id.product_tmpl_id.single_manufacturing == True:
|
||||
production = self.env['mrp.production'].search([('origin', '=', self.origin), ('product_id', '=', self.product_id.id)], limit=1, order='id asc')
|
||||
production = self.env['mrp.production'].search(
|
||||
[('origin', '=', self.origin), ('product_id', '=', self.product_id.id)], limit=1, order='id asc')
|
||||
else:
|
||||
production = self
|
||||
purchase_order_ids = (production.procurement_group_id.stock_move_ids.created_purchase_line_id.order_id | production.procurement_group_id.stock_move_ids.move_orig_ids.purchase_line_id.order_id).ids
|
||||
production = self
|
||||
purchase_order_ids = (
|
||||
production.procurement_group_id.stock_move_ids.created_purchase_line_id.order_id | production.procurement_group_id.stock_move_ids.move_orig_ids.purchase_line_id.order_id).ids
|
||||
action = {
|
||||
'res_model': 'purchase.order',
|
||||
'type': 'ir.actions.act_window',
|
||||
@@ -1490,6 +1492,7 @@ class MrpProduction(models.Model):
|
||||
})
|
||||
return action
|
||||
|
||||
|
||||
class sf_detection_result(models.Model):
|
||||
_name = 'sf.detection.result'
|
||||
_description = "检测结果"
|
||||
|
||||
Reference in New Issue
Block a user