修复数据同步问题

This commit is contained in:
mgw
2024-01-26 14:18:10 +08:00
parent 1af08763ea
commit 4ee4b28389
3 changed files with 8 additions and 8 deletions

View File

@@ -61,7 +61,7 @@ class MrsMaterialModel(models.Model):
supplier_ids = fields.One2many('sf.supplier.sort', 'materials_model_id', string='供应商')
active = fields.Boolean('有效', default=True)
@api.constrains('gain_way', 'supplier_ids')
@api.constrains('supplier_ids')
def _check_gain_way(self):
if not self.gain_way:
raise UserError("请输入获取方式")

View File

@@ -10,7 +10,7 @@
<xpath expr="//form//notebook//page[1]" position="after">
<!-- <xpath expr="//page[@name='other']" position="before">-->
<!-- <notebook> -->
<page string="机床监控">
<page string="机床运行状态" attrs="{'invisible': [('equipment_type', '!=', '机床')]}">
<group string='状态监控'>
<group>
<field name="timestamp"/>
@@ -143,7 +143,7 @@
<!-- </div> -->
<!-- </group> -->
</page>
<page string="机床配置">
<page string="机床运行数据" attrs="{'invisible': [('equipment_type', '!=', '机床')]}">
<!-- <group string="机床配置">--> -->
<group string="ftp相关">
<group>

View File

@@ -314,12 +314,12 @@ class sfProductionProcess(models.Model):
brand = self.env['sf.production.process'].search(
[("code", '=', item['code'])])
if brand:
brand.name = item['name'],
brand.name = item['name']
brand.category_id = self.env['sf.production.process.category'].search(
[("code", '=', item['category_code'])]).id,
brand.code = item['code'],
brand.remark = item['remark'],
brand.active = item['active'],
[("code", '=', item['category_code'])]).id
brand.code = item['code']
brand.remark = item['remark']
brand.active = item['active']
brand.remark = item['remark']
production_process = self.search([("code", '=', item['code'])])
category = self.env['sf.production.process.category'].search(