智能工厂-制造模块基础设置新增托盘
This commit is contained in:
@@ -68,6 +68,13 @@ class MrsProcessingOrder(models.Model):
|
||||
production_process_id = fields.Many2one('mrs.production.process', string="表面工艺")
|
||||
|
||||
|
||||
class ProductTemplate(models.Model):
|
||||
_inherit = 'product.template'
|
||||
_description = '产品'
|
||||
class Tray(models.Model):
|
||||
_name = 'sf.tray'
|
||||
_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_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_sf_tray,sf_tray,model_sf_tray,base.group_user,1,1,1,1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -23,6 +23,14 @@
|
||||
action="action_mrs_machine_tool"
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
id="menu_sf_tray"
|
||||
parent="mrp.menu_mrp_configuration"
|
||||
name="托盘"
|
||||
sequence="9"
|
||||
action="action_sf_tray"
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
sequence="2"
|
||||
name="基础数据"
|
||||
@@ -30,6 +38,7 @@
|
||||
action="mrs_production_materials"
|
||||
parent="mrp.menu_mrp_configuration"
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
id="menu_mrs_production_materials_1"
|
||||
name="原材料"
|
||||
@@ -38,14 +47,6 @@
|
||||
|
||||
/>
|
||||
|
||||
<!-- <menuitem-->
|
||||
<!-- id="menu_sf_product_template"-->
|
||||
<!-- name="产品"-->
|
||||
<!-- parent="menu_mrs_base"-->
|
||||
<!-- sequence="1"-->
|
||||
<!-- action="sf_product_template"-->
|
||||
<!-- />-->
|
||||
|
||||
<menuitem
|
||||
id="menu_mrs_production_process_1"
|
||||
name="工艺"
|
||||
@@ -54,7 +55,6 @@
|
||||
|
||||
/>
|
||||
|
||||
|
||||
<menuitem
|
||||
id="menu_mrs_production_process"
|
||||
name="表面工艺"
|
||||
|
||||
@@ -275,82 +275,64 @@
|
||||
</p>
|
||||
</field>
|
||||
</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>-->
|
||||
<!-- <field name="help" type="html">-->
|
||||
#------------------托盘------------------
|
||||
<record id="view_sf_tray_search" model="ir.ui.view">
|
||||
<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">-->
|
||||
<!-- 创建产品吧-->
|
||||
<!-- </p>-->
|
||||
<!-- </field>-->
|
||||
|
||||
<!-- </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>-->
|
||||
<!-- <field name="inherit_id" ref="account.product_template_form_view"/>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <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="tree_sf_tray_view">
|
||||
<field name="name">sf.tray.tree</field>
|
||||
<field name="model">sf.tray</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="托盘">
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</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>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user