品牌备注

This commit is contained in:
qihao.gong@jikimo.com
2023-08-18 14:31:28 +08:00
parent 422698ce34
commit c924426725
3 changed files with 8 additions and 6 deletions

View File

@@ -27,9 +27,8 @@
<tree string="品牌" create="0" edit="0" delete="0"> <tree string="品牌" create="0" edit="0" delete="0">
<field name="code"/> <field name="code"/>
<field name="name"/> <field name="name"/>
<field name="manufacturer_model_number"/>
<field name="tag_ids" widget="many2many_tags" optional="hide"/> <field name="tag_ids" widget="many2many_tags" optional="hide"/>
<field name="image_brand"/> <field name="remark"/>
</tree> </tree>
</field> </field>
</record> </record>

View File

@@ -45,13 +45,13 @@ class ResConfigSettings(models.TransientModel):
self.env['sf.cutting.tool.material'].sync_all_cutting_tool_material() self.env['sf.cutting.tool.material'].sync_all_cutting_tool_material()
_logger.info("同步所有刀具物料完成") _logger.info("同步所有刀具物料完成")
_logger.info("同步所有刀具类型...") _logger.info("同步所有刀具类型...")
self.env['sf.cutting.tool.type'].sync_all_tool_type() # self.env['sf.cutting.tool.type'].sync_all_tool_type()
_logger.info("同步所有刀具类型完成") # _logger.info("同步所有刀具类型完成")
_logger.info("定时同步所有功能刀具类型列表...") _logger.info("定时同步所有功能刀具类型列表...")
self.env['sf.functional.cutting.tool.model'].sync_all_functional_cutting_tool_model() self.env['sf.functional.cutting.tool.model'].sync_all_functional_cutting_tool_model()
_logger.info("同步所有功能刀具类型完成") _logger.info("同步所有功能刀具类型完成")
_logger.info("同步所有刀具型号...") _logger.info("同步所有刀具型号...")
self.env['sf.cutting.tool.model'].sync_all_tool_model() # self.env['sf.cutting.tool.model'].sync_all_tool_model()
_logger.info("同步所有刀具型号完成") _logger.info("同步所有刀具型号完成")
_logger.info("同步所有功能刀具列表...") _logger.info("同步所有功能刀具列表...")
self.env['sf.functional.cutting.tool'].sync_all_functional_cutting_tool() self.env['sf.functional.cutting.tool'].sync_all_functional_cutting_tool()

View File

@@ -529,7 +529,8 @@ class MachineBrand(models.Model):
brand.code = item['code'], brand.code = item['code'],
brand.image_brand = '' if not item['image_brand'] else base64.b64encode(item.image_brand), brand.image_brand = '' if not item['image_brand'] else base64.b64encode(item.image_brand),
brand.manufacturer_model_number = item['manufacturer_model_number'], brand.manufacturer_model_number = item['manufacturer_model_number'],
brand.active = item['active'] brand.active = item['active'],
brand.remark = item['remark'],
else: else:
self.env['sf.machine.brand'].create({ self.env['sf.machine.brand'].create({
"id": item['id'], "id": item['id'],
@@ -538,6 +539,7 @@ class MachineBrand(models.Model):
"image_brand": '' if not item['image_brand'] else base64.b64encode(item.image_brand), "image_brand": '' if not item['image_brand'] else base64.b64encode(item.image_brand),
"manufacturer_model_number": item['manufacturer_model_number'], "manufacturer_model_number": item['manufacturer_model_number'],
"active": item['active'], "active": item['active'],
"remark": item['remark'],
}) })
else: else:
@@ -564,6 +566,7 @@ class MachineBrand(models.Model):
"id": item['id'], "id": item['id'],
"name": item['name'], "name": item['name'],
"code": item['code'], "code": item['code'],
"remark": item['remark'],
"manufacturer_model_number": item['manufacturer_model_number'], "manufacturer_model_number": item['manufacturer_model_number'],
"image_brand": '' if not item['image_brand'] else base64.b64encode(item.image_brand), "image_brand": '' if not item['image_brand'] else base64.b64encode(item.image_brand),
"tag_ids": self.env['sf.machine.brand.tags'].search( "tag_ids": self.env['sf.machine.brand.tags'].search(