Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/新增夹具功能

This commit is contained in:
jinling.yang
2023-06-29 17:14:48 +08:00
141 changed files with 20125 additions and 4856 deletions

View File

@@ -15,5 +15,28 @@ class FunctionalFixture(models.Model):
_description = "功能夹具"
code = fields.Char(string='编码', readonly=True)
name = fields.Char(string="名称", size=15)
functional_fixture_type_id = fields.Many2one('mrs.functional.fixture.type', string="功能夹具类型" )
name = fields.Char(string="名称", size=15, required=True)
functional_fixture_type_id = fields.Many2one('sf.functional.fixture.type', string="功能夹具类型", required=True)
zero_chuck_model_ids = fields.Many2many('sf.fixture.model', 'rel_fixture_model_zero_chuck', string="零点卡盘型号",
required=True,
domain=[('fixture_material_type', '=', '零点卡盘')])
transfer_tray_model_ids = fields.Many2many('sf.fixture.model', 'rel_fixture_model_transfer_tray',
string="转接板(锁板)托盘型号",
domain=[('fixture_material_type', '=', '转接板(锁板)托盘')])
pneumatic_tray_model_ids = fields.Many2many('sf.fixture.model', 'rel_fixture_model_pneumatic_tray',
string="气动托盘型号",
domain=[('fixture_material_type', '=', '气动托盘')])
magnetic_tray_model_ids = fields.Many2many('sf.fixture.model', 'rel_fixture_model_magnetic_tray',
string="磁吸托盘型号",
domain=[('fixture_material_type', '=', '磁吸托盘')])
vice_tray_model_ids = fields.Many2many('sf.fixture.model', 'rel_fixture_model_vice_tray', string="虎钳托盘型号",
domain=[('fixture_material_type', '=', '虎钳托盘')])
def _get_fixture_model_ids(self, fixture_model_code):
fixture_model_ids = []
for item in fixture_model_code:
fixture_model = self.env['sf.fixture.model'].search([('code', '=', item)])
fixture_model_ids.append(fixture_model.id)
return [(6, 0, fixture_model_ids)]