智能工厂-制造模块基础设置新增托盘
This commit is contained in:
@@ -68,6 +68,13 @@ class MrsProcessingOrder(models.Model):
|
|||||||
production_process_id = fields.Many2one('mrs.production.process', string="表面工艺")
|
production_process_id = fields.Many2one('mrs.production.process', string="表面工艺")
|
||||||
|
|
||||||
|
|
||||||
class ProductTemplate(models.Model):
|
class Tray(models.Model):
|
||||||
_inherit = 'product.template'
|
_name = 'sf.tray'
|
||||||
_description = '产品'
|
_description = '托盘'
|
||||||
|
|
||||||
|
code = fields.Char('编码')
|
||||||
|
name = fields.Char('名称')
|
||||||
|
state = fields.Selection(
|
||||||
|
[("空闲", "空闲"), ("占用", "占用"), ("报损", "报损")],
|
||||||
|
default=" ", string="状态")
|
||||||
|
active = fields.Boolean('有效', default=True)
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ access_mrs_production_process,mrs_production_process,model_mrs_production_proces
|
|||||||
access_mrs_production_materials,mrs_production_materials,model_mrs_production_materials,base.group_user,1,1,1,1
|
access_mrs_production_materials,mrs_production_materials,model_mrs_production_materials,base.group_user,1,1,1,1
|
||||||
access_mrs_materials_model,mrs_materials_model,model_mrs_materials_model,base.group_user,1,1,1,1
|
access_mrs_materials_model,mrs_materials_model,model_mrs_materials_model,base.group_user,1,1,1,1
|
||||||
access_mrs_processing_technology,mrs_processing_technology,model_mrs_processing_technology,base.group_user,1,1,1,1
|
access_mrs_processing_technology,mrs_processing_technology,model_mrs_processing_technology,base.group_user,1,1,1,1
|
||||||
|
access_sf_tray,sf_tray,model_sf_tray,base.group_user,1,1,1,1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
|
@@ -23,6 +23,14 @@
|
|||||||
action="action_mrs_machine_tool"
|
action="action_mrs_machine_tool"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<menuitem
|
||||||
|
id="menu_sf_tray"
|
||||||
|
parent="mrp.menu_mrp_configuration"
|
||||||
|
name="托盘"
|
||||||
|
sequence="9"
|
||||||
|
action="action_sf_tray"
|
||||||
|
/>
|
||||||
|
|
||||||
<menuitem
|
<menuitem
|
||||||
sequence="2"
|
sequence="2"
|
||||||
name="基础数据"
|
name="基础数据"
|
||||||
@@ -30,6 +38,7 @@
|
|||||||
action="mrs_production_materials"
|
action="mrs_production_materials"
|
||||||
parent="mrp.menu_mrp_configuration"
|
parent="mrp.menu_mrp_configuration"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_mrs_production_materials_1"
|
id="menu_mrs_production_materials_1"
|
||||||
name="原材料"
|
name="原材料"
|
||||||
@@ -38,14 +47,6 @@
|
|||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- <menuitem-->
|
|
||||||
<!-- id="menu_sf_product_template"-->
|
|
||||||
<!-- name="产品"-->
|
|
||||||
<!-- parent="menu_mrs_base"-->
|
|
||||||
<!-- sequence="1"-->
|
|
||||||
<!-- action="sf_product_template"-->
|
|
||||||
<!-- />-->
|
|
||||||
|
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_mrs_production_process_1"
|
id="menu_mrs_production_process_1"
|
||||||
name="工艺"
|
name="工艺"
|
||||||
@@ -54,7 +55,6 @@
|
|||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_mrs_production_process"
|
id="menu_mrs_production_process"
|
||||||
name="表面工艺"
|
name="表面工艺"
|
||||||
|
|||||||
@@ -275,82 +275,64 @@
|
|||||||
</p>
|
</p>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</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>-->
|
|
||||||
|
|
||||||
<!-- <field name="res_model">product.template</field>-->
|
#------------------托盘------------------
|
||||||
<!-- <field name="view_mode">tree,form</field>-->
|
<record id="view_sf_tray_search" model="ir.ui.view">
|
||||||
<!-- <field name="help" type="html">-->
|
<field name="name">sf.tray.search</field>
|
||||||
|
<field name="model">sf.tray</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<search string="托盘">
|
||||||
|
<field name="name" string="名称" filter_domain="[('name','ilike',self)]"/>
|
||||||
|
<field name="code" string="编码" filter_domain="[('code','ilike',self)]"/>
|
||||||
|
<!-- <field name="state" string="状态" filter_domain="[('state','ilike',self)]"/>-->
|
||||||
|
</search>
|
||||||
|
<group string="分组">
|
||||||
|
<filter name="state" string="状态" domain="[]" context="{'group_by': 'state'}"/>
|
||||||
|
</group>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<!-- <p class="o_view_nocontent_smiling_face">-->
|
<record model="ir.ui.view" id="tree_sf_tray_view">
|
||||||
<!-- 创建产品吧-->
|
<field name="name">sf.tray.tree</field>
|
||||||
<!-- </p>-->
|
<field name="model">sf.tray</field>
|
||||||
<!-- </field>-->
|
<field name="arch" type="xml">
|
||||||
|
<tree string="托盘">
|
||||||
<!-- </record>-->
|
<field name="code"/>
|
||||||
<!-- <record id="view_product_account_purchase_ok_form" model="ir.ui.view">-->
|
<field name="name"/>
|
||||||
<!-- <field name="name">product.template.materials</field>-->
|
<field name="state"/>
|
||||||
<!-- <field name="model">product.template</field>-->
|
</tree>
|
||||||
<!-- <field name="inherit_id" ref="account.product_template_form_view"/>-->
|
</field>
|
||||||
<!-- <field name="arch" type="xml">-->
|
</record>
|
||||||
<!-- <field name="name" position="after" >-->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- </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)]" />-->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- </search>-->
|
|
||||||
<!-- </field>-->
|
|
||||||
<!-- </record>-->
|
|
||||||
<!-- <record id="token_factory_view" model="ir.actions.act_window">-->
|
|
||||||
<!-- <field name="name">合作伙伴</field>-->
|
|
||||||
<!-- <field name="type">ir.actions.act_window</field>-->
|
|
||||||
<!-- <field name="domain">[('sf_token', '!=', False),('sf_secret_key', '!=', False)]</field>-->
|
|
||||||
<!-- <field name="res_model">res.partner</field>-->
|
|
||||||
<!-- <field name="view_mode">tree,form</field>-->
|
|
||||||
<!-- <field name="help" type="html">-->
|
|
||||||
<!-- <p class="o_view_nocontent_smiling_face">-->
|
|
||||||
<!-- 加工工厂!-->
|
|
||||||
<!-- </p>-->
|
|
||||||
<!-- </field>-->
|
|
||||||
<!-- </record>-->
|
|
||||||
|
|
||||||
<!-- <record id="mrs_view_partner_form" model="ir.ui.view">-->
|
|
||||||
<!-- <field name="name">view_partner_form</field>-->
|
|
||||||
<!-- <field name="model">res.partner</field>-->
|
|
||||||
<!-- <field name="inherit_id" ref="base.view_partner_form"/>-->
|
|
||||||
<!-- <field name="arch" type="xml">-->
|
|
||||||
<!-- <field name="name" position="after" invisible="1">-->
|
|
||||||
<!-- <form>-->
|
|
||||||
<!-- <group>-->
|
|
||||||
<!-- <group>-->
|
|
||||||
<!-- <field name="sf_token" string='token' readonly="1"/>-->
|
|
||||||
<!-- <field name="sf_secret_key" string='密钥' readonly="1"/>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- </group>-->
|
|
||||||
<!-- </form>-->
|
|
||||||
<!-- </field>-->
|
|
||||||
|
|
||||||
<!-- </field>-->
|
|
||||||
<!-- </record>-->
|
|
||||||
|
|
||||||
<!-- </search>-->
|
|
||||||
<!-- </field>-->
|
|
||||||
<!-- </record>-->
|
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="sf_tray_form">
|
||||||
|
<field name="name">sf.tray.form</field>
|
||||||
|
<field name="model">sf.tray</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="托盘">
|
||||||
|
<group string="基本信息">
|
||||||
|
<group>
|
||||||
|
<field name="code" required="1"/>
|
||||||
|
<field name="state" required="1"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="name" required="1"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="action_sf_tray" model="ir.actions.act_window">
|
||||||
|
<field name="name">托盘</field>
|
||||||
|
<field name="type">ir.actions.act_window</field>
|
||||||
|
<field name="res_model">sf.tray</field>
|
||||||
|
<field name="view_mode">tree,form</field>
|
||||||
|
<field name="help" type="html">
|
||||||
|
<p class="o_view_nocontent_smiling_face">
|
||||||
|
创建托盘吧
|
||||||
|
</p>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
</odoo>
|
</odoo>
|
||||||
Reference in New Issue
Block a user