1.夹具物料,联装类型,功能夹具类型的Tree视图去掉删除方法和删除操作;同步的方法里新增active字段

2.品牌模型新增厂家型号字段
3.修复3D模型全屏展示及不显示模型Bug
This commit is contained in:
jinling.yang
2023-07-26 18:52:27 +08:00
parent 72b3e736c0
commit 7ee652d021
7 changed files with 20520 additions and 456 deletions

View File

@@ -34,6 +34,7 @@ class MachineBrand(models.Model):
name = fields.Char('名称')
tag_ids = fields.Many2many('sf.machine.brand.tags', 'rel_machine_brand_tags', string='类别')
image_brand = fields.Image("品牌图片")
manufacturer_model_number = fields.Char('厂家型号', size=10)
active = fields.Boolean('有效', default=True)
code = fields.Char('编码')

View File

@@ -1,5 +1,4 @@
from odoo import models, fields, api
from odoo.exceptions import UserError
class FixtureMaterial(models.Model):
@@ -8,12 +7,9 @@ class FixtureMaterial(models.Model):
code = fields.Char(string='编码')
name = fields.Char(string="名称", size=15)
category = fields.Selection([('零点夹具', '零点夹具')], string="类别")
remark = fields.Char(string="备注")
def unlink(self):
for record in self:
if record:
raise UserError('不允许删除数据!')
active = fields.Boolean(string="有效", default=True)
class Multi_MountingType(models.Model):
@@ -23,6 +19,7 @@ class Multi_MountingType(models.Model):
code = fields.Char(string='编码')
name = fields.Char(string="名称", size=15)
remark = fields.Char(string="备注")
active = fields.Boolean(string="有效", default=True)
class FixtureModel(models.Model):
@@ -35,6 +32,7 @@ class FixtureModel(models.Model):
fixture_material_type = fields.Char(string="夹具物料类型", related='fixture_material_id.name')
multi_mounting_type_id = fields.Many2one('sf.multi_mounting.type', string="联装类型")
brand_id = fields.Many2one('sf.machine.brand', string="品牌")
manufacturer_model_number = fields.Char(string="厂家型号")
clamping_way = fields.Char(string="装夹方式")
port_type = fields.Char(string="接口类型")
model_file = fields.Binary(string="3D模型图")

View File

@@ -8,6 +8,7 @@ class FunctionalFixtureType(models.Model):
code = fields.Char(string='编码', readonly=True)
name = fields.Char(string="名称", size=15)
remark = fields.Char(string="备注")
active = fields.Boolean(string="有效", default=True)
class FunctionalFixture(models.Model):
@@ -17,6 +18,7 @@ class FunctionalFixture(models.Model):
code = fields.Char(string='编码', readonly=True)
name = fields.Char(string="名称", size=15, required=True)
type_id = fields.Many2one('sf.functional.fixture.type', string="功能夹具类型", required=True)
type = fields.Char(related='type_id.name', string="功能夹具类别", store=True)
zero_chuck_model_ids = fields.Many2many('sf.fixture.model', 'rel_fixture_model_zero_chuck', string="零点卡盘型号",
required=True,
domain=[('fixture_material_type', '=', '零点卡盘')])