处理控制系统参数丢失问题

This commit is contained in:
qihao.gong@jikimo.com
2023-08-11 17:06:57 +08:00
parent 150c40f9b1
commit ce3ffb75ae
3 changed files with 3 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ class MachineControlSystem(models.Model):
code = fields.Char('编码', size=10)
name = fields.Char('名称')
remark = fields.Char('备注')
brand_id = fields.Many2one('sf.machine.brand', '品牌')
active = fields.Boolean('有效', default=True)

View File

@@ -452,6 +452,7 @@
<field name="code"/>
<field name="name"/>
<field name="brand_id"/>
<field name="remark"/>
</tree>
</field>
</record>

View File

@@ -489,6 +489,7 @@ class MachineControlSystem(models.Model):
"id": item['id'],
"name": item['name'],
"code": item['code'],
"remark": item['remark'],
'brand_id': self.env['sf.machine.brand'].search([('code', '=', item['brand_id'])]).id,
"active": item['active'],