Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into develop
This commit is contained in:
@@ -38,13 +38,13 @@
|
||||
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
id="menu_sf_product_template"
|
||||
name="产品"
|
||||
parent="menu_mrs_base"
|
||||
sequence="1"
|
||||
action="sf_product_template"
|
||||
/>
|
||||
<!-- <menuitem-->
|
||||
<!-- id="menu_sf_product_template"-->
|
||||
<!-- name="产品"-->
|
||||
<!-- parent="menu_mrs_base"-->
|
||||
<!-- sequence="1"-->
|
||||
<!-- action="sf_product_template"-->
|
||||
<!-- />-->
|
||||
|
||||
<menuitem
|
||||
id="menu_mrs_production_process_1"
|
||||
|
||||
@@ -277,20 +277,20 @@
|
||||
</record>
|
||||
<!--产品-->
|
||||
<!-- <field name="domain">[('materials_model_ids', '!=', False)]</field>-->
|
||||
<record id="sf_product_template" model="ir.actions.act_window">
|
||||
<field name="name">产品</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<!-- <record id="sf_product_template" model="ir.actions.act_window">-->
|
||||
<!-- <field name="name">产品</field>-->
|
||||
<!-- <field name="type">ir.actions.act_window</field>-->
|
||||
|
||||
<field name="res_model">product.template</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="help" type="html">
|
||||
<!-- <field name="res_model">product.template</field>-->
|
||||
<!-- <field name="view_mode">tree,form</field>-->
|
||||
<!-- <field name="help" type="html">-->
|
||||
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
创建产品吧
|
||||
</p>
|
||||
</field>
|
||||
<!-- <p class="o_view_nocontent_smiling_face">-->
|
||||
<!-- 创建产品吧-->
|
||||
<!-- </p>-->
|
||||
<!-- </field>-->
|
||||
|
||||
</record>
|
||||
<!-- </record>-->
|
||||
<!-- <record id="view_product_account_purchase_ok_form" model="ir.ui.view">-->
|
||||
<!-- <field name="name">product.template.materials</field>-->
|
||||
<!-- <field name="model">product.template</field>-->
|
||||
@@ -302,17 +302,17 @@
|
||||
<!-- </field>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
<record id="view_product_account_purchase_ok_search" model="ir.ui.view">
|
||||
<field name="name">product.template.materials.search</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="产品名">
|
||||
<field name="name" string="产品名查询"
|
||||
filter_domain = "[('name','ilike',self)]" />
|
||||
<!-- <record id="view_product_account_purchase_ok_search" model="ir.ui.view">-->
|
||||
<!-- <field name="name">product.template.materials.search</field>-->
|
||||
<!-- <field name="model">product.template</field>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <search string="产品名">-->
|
||||
<!-- <field name="name" string="产品名查询"-->
|
||||
<!-- filter_domain = "[('name','ilike',self)]" />-->
|
||||
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<!-- </search>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
|
||||
</data>
|
||||
|
||||
@@ -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("同步资源库成功")
|
||||
|
||||
@@ -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'],
|
||||
|
||||
Reference in New Issue
Block a user