合并业务平台

This commit is contained in:
gqh
2022-10-10 17:01:22 +08:00
parent 839de4c95f
commit 6d2292e1d0
4 changed files with 41 additions and 31 deletions

View File

@@ -16,16 +16,26 @@ class ResConfigSettings(models.TransientModel):
def sf_all_sync(self):
self.env['mrs.production.materials'].sync_all_production_materials()
_logger.info("同步资源库材料")
self.env['mrs.materials.model'].sync_all_materials_model()
_logger.info("同步资源库材料型号")
self.env['mrs.production.process'].sync_all_production_process()
_logger.info("同步资源库表面工艺")
self.env['mrs.processing.technology'].sync_all_processing_technology()
_logger.info("同步资源库加工工艺")
self.env['mrs.machine.brand.tags'].sync_all_machine_brand_tags()
_logger.info("同步资源库品牌类别")
self.env['mrs.machine.brand'].sync_all_machine_brand()
_logger.info("同步资源库品牌")
self.env['mrs.machine.control_system'].sync_all_machine_tool_type_control_system()
_logger.info("同步资源库控制系统")
# self.env['mrs.machine_tool'].sync_all_machine_tool()
self.env['mrs.machine_tool.type'].sync_all_machine_tool_type()
_logger.info("同步资源库机床型号")
self.env['mrs.cutting_tool.category'].sync_all_cutting_tool_category()
_logger.info("同步资源库刀具类别")
self.env['mrs.cutting_tool.type'].sync_all_cutting_tool_type()
_logger.info("同步资源库刀具")
# self.env['mrs.processing.order'].sync_all_processing_order()
return _logger.info("同步资源库成功")

View File

@@ -104,7 +104,7 @@ class MrsMaterialModel(models.Model):
for item in result['materials_model_yesterday_list']:
if item:
brand = self.env['mrs.materials.model'].search(
[("materials_num", '=', item['materials_num'])])
[("materials_no", '=', item['materials_no'])])
if brand:
brand.id = item['id'],
brand.name = item['name'],
@@ -119,7 +119,7 @@ class MrsMaterialModel(models.Model):
self.env['mrs.materials.model'].create({
"id": item['id'],
"name": item['name'],
"materials_num": item['materials_num'],
"materials_no": item['materials_no'],
"remark": item['remark'],
"active": item['active'],
"materials_id": item['materials_id'],
@@ -148,7 +148,7 @@ class MrsMaterialModel(models.Model):
self.env['mrs.materials.model'].create({
"id": item['id'],
"name": item['name'],
"materials_num": item['materials_num'],
"materials_no": item['materials_no'],
"remark": item['remark'],
"active": item['active'],
"materials_id": item['materials_id'],