夹具型号同步修复
This commit is contained in:
@@ -1519,10 +1519,11 @@ class SyncFixtureModel(models.Model):
|
||||
"materials_model_id": self.env['sf.materials.model'].search(
|
||||
[('materials_no', '=', item['materials_model_code'])]).id,
|
||||
"driving_way": item['driving_way'],
|
||||
"apply_machine_tool_type_id": self.env['sf.machine_tool.type'].search(
|
||||
[('code', '=', item['apply_machine_tool_type_code'])]).id,
|
||||
"apply_machine_tool_type_ids": self.env['sf.machine_tool.type'].sudo()._get_ids(
|
||||
item['apply_machine_tool_type_code']).id,
|
||||
"through_hole_size": item['through_hole_size'],
|
||||
"screw_size": item['screw_size'],
|
||||
"active": item['active'],
|
||||
})
|
||||
else:
|
||||
fixture_model.write({
|
||||
@@ -1548,10 +1549,11 @@ class SyncFixtureModel(models.Model):
|
||||
"materials_model_id": self.env['sf.materials.model'].search(
|
||||
[('materials_no', '=', item['materials_model_code'])]).id,
|
||||
"driving_way": item['driving_way'],
|
||||
"apply_machine_tool_type_id": self.env['sf.machine_tool.type'].search(
|
||||
[('code', '=', item['apply_machine_tool_type_code'])]).id,
|
||||
"apply_machine_tool_type_ids": self.env['sf.machine_tool.type'].sudo()._get_ids(
|
||||
item['apply_machine_tool_type_code']).id,
|
||||
"through_hole_size": item['through_hole_size'],
|
||||
"screw_size": item['screw_size'],
|
||||
"active": item['active'],
|
||||
})
|
||||
else:
|
||||
raise ValidationError("认证未通过")
|
||||
@@ -1599,10 +1601,11 @@ class SyncFixtureModel(models.Model):
|
||||
"materials_model_id": self.env['sf.materials.model'].search(
|
||||
[('materials_no', '=', item['materials_model_code'])]).id,
|
||||
"driving_way": item['driving_way'],
|
||||
"apply_machine_tool_type_id": self.env['sf.machine_tool.type'].search(
|
||||
[('code', '=', item['apply_machine_tool_type_code'])]).id,
|
||||
"apply_machine_tool_type_ids": self.env['sf.machine_tool.type'].sudo()._get_ids(
|
||||
item['apply_machine_tool_type_code']).id,
|
||||
"through_hole_size": item['through_hole_size'],
|
||||
"screw_size": item['screw_size'],
|
||||
"active": item['active'],
|
||||
})
|
||||
else:
|
||||
fixture_model.write({
|
||||
@@ -1628,8 +1631,8 @@ class SyncFixtureModel(models.Model):
|
||||
"materials_model_id": self.env['sf.materials.model'].search(
|
||||
[('materials_no', '=', item['materials_model_code'])]).id,
|
||||
"driving_way": item['driving_way'],
|
||||
"apply_machine_tool_type_id": self.env['sf.machine_tool.type'].search(
|
||||
[('code', '=', item['apply_machine_tool_type_code'])]).id,
|
||||
"apply_machine_tool_type_ids": self.env['sf.machine_tool.type'].sudo()._get_ids(
|
||||
item['apply_machine_tool_type_code']).id,
|
||||
"through_hole_size": item['through_hole_size'],
|
||||
"screw_size": item['screw_size'],
|
||||
"active": item['active'],
|
||||
|
||||
Reference in New Issue
Block a user