1.物料page里的库存模型新增物料长宽高三个字段
2.修复功能夹具同步Bug 3.夹具物料新增不可删除控制
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from odoo import models, fields, api
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
|
||||
class FixtureMaterial(models.Model):
|
||||
@@ -9,6 +10,11 @@ class FixtureMaterial(models.Model):
|
||||
name = fields.Char(string="名称", size=15)
|
||||
remark = fields.Char(string="备注")
|
||||
|
||||
def unlink(self):
|
||||
for record in self:
|
||||
if record:
|
||||
raise UserError('不允许删除数据!')
|
||||
|
||||
|
||||
class Multi_MountingType(models.Model):
|
||||
_name = 'sf.multi_mounting.type'
|
||||
|
||||
@@ -36,7 +36,6 @@ class FunctionalFixture(models.Model):
|
||||
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)
|
||||
if fixture_model:
|
||||
fixture_model_ids.append(fixture_model.id)
|
||||
return [(6, 0, fixture_model_ids)]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user