合并业务平台
This commit is contained in:
@@ -38,13 +38,13 @@
|
|||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<menuitem
|
<!-- <menuitem-->
|
||||||
id="menu_sf_product_template"
|
<!-- id="menu_sf_product_template"-->
|
||||||
name="产品"
|
<!-- name="产品"-->
|
||||||
parent="menu_mrs_base"
|
<!-- parent="menu_mrs_base"-->
|
||||||
sequence="1"
|
<!-- sequence="1"-->
|
||||||
action="sf_product_template"
|
<!-- action="sf_product_template"-->
|
||||||
/>
|
<!-- />-->
|
||||||
|
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_mrs_production_process_1"
|
id="menu_mrs_production_process_1"
|
||||||
|
|||||||
@@ -277,20 +277,20 @@
|
|||||||
</record>
|
</record>
|
||||||
<!--产品-->
|
<!--产品-->
|
||||||
<!-- <field name="domain">[('materials_model_ids', '!=', False)]</field>-->
|
<!-- <field name="domain">[('materials_model_ids', '!=', False)]</field>-->
|
||||||
<record id="sf_product_template" model="ir.actions.act_window">
|
<!-- <record id="sf_product_template" model="ir.actions.act_window">-->
|
||||||
<field name="name">产品</field>
|
<!-- <field name="name">产品</field>-->
|
||||||
<field name="type">ir.actions.act_window</field>
|
<!-- <field name="type">ir.actions.act_window</field>-->
|
||||||
|
|
||||||
<field name="res_model">product.template</field>
|
<!-- <field name="res_model">product.template</field>-->
|
||||||
<field name="view_mode">tree,form</field>
|
<!-- <field name="view_mode">tree,form</field>-->
|
||||||
<field name="help" type="html">
|
<!-- <field name="help" type="html">-->
|
||||||
|
|
||||||
<p class="o_view_nocontent_smiling_face">
|
<!-- <p class="o_view_nocontent_smiling_face">-->
|
||||||
创建产品吧
|
<!-- 创建产品吧-->
|
||||||
</p>
|
<!-- </p>-->
|
||||||
</field>
|
<!-- </field>-->
|
||||||
|
|
||||||
</record>
|
<!-- </record>-->
|
||||||
<!-- <record id="view_product_account_purchase_ok_form" model="ir.ui.view">-->
|
<!-- <record id="view_product_account_purchase_ok_form" model="ir.ui.view">-->
|
||||||
<!-- <field name="name">product.template.materials</field>-->
|
<!-- <field name="name">product.template.materials</field>-->
|
||||||
<!-- <field name="model">product.template</field>-->
|
<!-- <field name="model">product.template</field>-->
|
||||||
@@ -302,17 +302,17 @@
|
|||||||
<!-- </field>-->
|
<!-- </field>-->
|
||||||
<!-- </field>-->
|
<!-- </field>-->
|
||||||
<!-- </record>-->
|
<!-- </record>-->
|
||||||
<record id="view_product_account_purchase_ok_search" model="ir.ui.view">
|
<!-- <record id="view_product_account_purchase_ok_search" model="ir.ui.view">-->
|
||||||
<field name="name">product.template.materials.search</field>
|
<!-- <field name="name">product.template.materials.search</field>-->
|
||||||
<field name="model">product.template</field>
|
<!-- <field name="model">product.template</field>-->
|
||||||
<field name="arch" type="xml">
|
<!-- <field name="arch" type="xml">-->
|
||||||
<search string="产品名">
|
<!-- <search string="产品名">-->
|
||||||
<field name="name" string="产品名查询"
|
<!-- <field name="name" string="产品名查询"-->
|
||||||
filter_domain = "[('name','ilike',self)]" />
|
<!-- filter_domain = "[('name','ilike',self)]" />-->
|
||||||
|
|
||||||
</search>
|
<!-- </search>-->
|
||||||
</field>
|
<!-- </field>-->
|
||||||
</record>
|
<!-- </record>-->
|
||||||
|
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -16,16 +16,26 @@ class ResConfigSettings(models.TransientModel):
|
|||||||
|
|
||||||
def sf_all_sync(self):
|
def sf_all_sync(self):
|
||||||
self.env['mrs.production.materials'].sync_all_production_materials()
|
self.env['mrs.production.materials'].sync_all_production_materials()
|
||||||
|
_logger.info("同步资源库材料")
|
||||||
self.env['mrs.materials.model'].sync_all_materials_model()
|
self.env['mrs.materials.model'].sync_all_materials_model()
|
||||||
|
_logger.info("同步资源库材料型号")
|
||||||
self.env['mrs.production.process'].sync_all_production_process()
|
self.env['mrs.production.process'].sync_all_production_process()
|
||||||
|
_logger.info("同步资源库表面工艺")
|
||||||
self.env['mrs.processing.technology'].sync_all_processing_technology()
|
self.env['mrs.processing.technology'].sync_all_processing_technology()
|
||||||
|
_logger.info("同步资源库加工工艺")
|
||||||
self.env['mrs.machine.brand.tags'].sync_all_machine_brand_tags()
|
self.env['mrs.machine.brand.tags'].sync_all_machine_brand_tags()
|
||||||
|
_logger.info("同步资源库品牌类别")
|
||||||
self.env['mrs.machine.brand'].sync_all_machine_brand()
|
self.env['mrs.machine.brand'].sync_all_machine_brand()
|
||||||
|
_logger.info("同步资源库品牌")
|
||||||
self.env['mrs.machine.control_system'].sync_all_machine_tool_type_control_system()
|
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'].sync_all_machine_tool()
|
||||||
self.env['mrs.machine_tool.type'].sync_all_machine_tool_type()
|
self.env['mrs.machine_tool.type'].sync_all_machine_tool_type()
|
||||||
|
_logger.info("同步资源库机床型号")
|
||||||
self.env['mrs.cutting_tool.category'].sync_all_cutting_tool_category()
|
self.env['mrs.cutting_tool.category'].sync_all_cutting_tool_category()
|
||||||
|
_logger.info("同步资源库刀具类别")
|
||||||
self.env['mrs.cutting_tool.type'].sync_all_cutting_tool_type()
|
self.env['mrs.cutting_tool.type'].sync_all_cutting_tool_type()
|
||||||
|
_logger.info("同步资源库刀具")
|
||||||
# self.env['mrs.processing.order'].sync_all_processing_order()
|
# self.env['mrs.processing.order'].sync_all_processing_order()
|
||||||
|
|
||||||
return _logger.info("同步资源库成功")
|
return _logger.info("同步资源库成功")
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ class MrsMaterialModel(models.Model):
|
|||||||
for item in result['materials_model_yesterday_list']:
|
for item in result['materials_model_yesterday_list']:
|
||||||
if item:
|
if item:
|
||||||
brand = self.env['mrs.materials.model'].search(
|
brand = self.env['mrs.materials.model'].search(
|
||||||
[("materials_num", '=', item['materials_num'])])
|
[("materials_no", '=', item['materials_no'])])
|
||||||
if brand:
|
if brand:
|
||||||
brand.id = item['id'],
|
brand.id = item['id'],
|
||||||
brand.name = item['name'],
|
brand.name = item['name'],
|
||||||
@@ -119,7 +119,7 @@ class MrsMaterialModel(models.Model):
|
|||||||
self.env['mrs.materials.model'].create({
|
self.env['mrs.materials.model'].create({
|
||||||
"id": item['id'],
|
"id": item['id'],
|
||||||
"name": item['name'],
|
"name": item['name'],
|
||||||
"materials_num": item['materials_num'],
|
"materials_no": item['materials_no'],
|
||||||
"remark": item['remark'],
|
"remark": item['remark'],
|
||||||
"active": item['active'],
|
"active": item['active'],
|
||||||
"materials_id": item['materials_id'],
|
"materials_id": item['materials_id'],
|
||||||
@@ -148,7 +148,7 @@ class MrsMaterialModel(models.Model):
|
|||||||
self.env['mrs.materials.model'].create({
|
self.env['mrs.materials.model'].create({
|
||||||
"id": item['id'],
|
"id": item['id'],
|
||||||
"name": item['name'],
|
"name": item['name'],
|
||||||
"materials_num": item['materials_num'],
|
"materials_no": item['materials_no'],
|
||||||
"remark": item['remark'],
|
"remark": item['remark'],
|
||||||
"active": item['active'],
|
"active": item['active'],
|
||||||
"materials_id": item['materials_id'],
|
"materials_id": item['materials_id'],
|
||||||
|
|||||||
Reference in New Issue
Block a user