优化装夹工单,新增工件装夹page,名字为组件的page名称改为物料,去掉单独的工件装夹功能
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
'views/functional_fixture_view.xml',
|
||||
'wizard/workpiece_clamping_wizard_view.xml',
|
||||
'wizard/stock_removal_wizard_view.xml',
|
||||
'views/assemble_view.xml',
|
||||
'views/menu_view.xml',
|
||||
"views/tool_views.xml",
|
||||
"views/tool_menu.xml",
|
||||
|
||||
@@ -3,7 +3,6 @@ from . import common
|
||||
from . import tool_base_new
|
||||
from . import fixture
|
||||
from . import functional_fixture
|
||||
from . import assemble
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
from odoo import models, fields, api
|
||||
|
||||
|
||||
class Assemble(models.Model):
|
||||
_name = 'sf.assemble'
|
||||
_description = "组合装夹"
|
||||
|
||||
functional_fixture_code = fields.Char(string="功能夹具编码", readonly=True)
|
||||
name = fields.Char(string="功能夹具名称", readonly=True)
|
||||
functional_fixture_type_id = fields.Many2one('sf.functional.fixture.type', string="功能夹具类型", readonly=True)
|
||||
chuck_name = fields.Char(string="卡盘名称")
|
||||
chuck_brand_id = fields.Many2one('sf.machine.brand', string="卡盘品牌")
|
||||
chuck_type_id = fields.Char(string="卡盘类型")
|
||||
chuck_model_id = fields.Char(string="卡盘型号")
|
||||
tray_name = fields.Char(string="托盘名称")
|
||||
tray_brand_id = fields.Many2one('sf.machine.brand', string="托盘品牌")
|
||||
tray_type_id = fields.Char(string="托盘类型")
|
||||
tray_model_id = fields.Char(string="托盘型号")
|
||||
real_code = fields.Char(string="真实坯料编码")
|
||||
real_name = fields.Char(string="真实坯料名称")
|
||||
real_width = fields.Float(string="真实宽度")
|
||||
real_length = fields.Float(string="真实长度")
|
||||
real_height = fields.Float(string="真实高度")
|
||||
real_diameter = fields.Float(string="真实直径")
|
||||
total_wight = fields.Float(string="总重量")
|
||||
maximum_carrying_weight = fields.Char(string="最大承载重量[kg]")
|
||||
maximum_clamping_force = fields.Char(string="最大夹持力[n]")
|
||||
production_line = fields.Char(string="生产线")
|
||||
# 以下为智能工厂工单带过来的机床信息
|
||||
machine_tool = fields.Many2one('sf.machine_tool', string="机床名称")
|
||||
machine_tool_startime = fields.Date(string="机床开始加工时间")
|
||||
# 以下为智能工厂工单带过来的信息
|
||||
apply_staff = fields.Char(string="申请人")
|
||||
machine_tool_code = fields.Char(string="机床编码")
|
||||
apply_time = fields.Date(string="申请时间")
|
||||
apply_reason = fields.Char(string="申请原因")
|
||||
# 以下为装夹的信息
|
||||
preset_staff = fields.Char(string="预调名称")
|
||||
preset_time = fields.Date(string="预调时间")
|
||||
material_taker = fields.Char(string="领料人")
|
||||
material_removal_time = fields.Date(string="领料出库时间")
|
||||
remark = fields.Char(string="备注")
|
||||
# 以下为出库的信息
|
||||
stock_removal_code = fields.Char(string="出库人")
|
||||
@@ -16,7 +16,7 @@ class FunctionalFixture(models.Model):
|
||||
|
||||
code = fields.Char(string='编码', readonly=True)
|
||||
name = fields.Char(string="名称", size=15, required=True)
|
||||
functional_fixture_type_id = fields.Many2one('sf.functional.fixture.type', string="功能夹具类型", required=True)
|
||||
type_id = fields.Many2one('sf.functional.fixture.type', string="功能夹具类型", required=True)
|
||||
zero_chuck_model_ids = fields.Many2many('sf.fixture.model', 'rel_fixture_model_zero_chuck', string="零点卡盘型号",
|
||||
required=True,
|
||||
domain=[('fixture_material_type', '=', '零点卡盘')])
|
||||
|
||||
@@ -26,7 +26,6 @@ access_sf_functional_fixture_type,sf_functional_fixture_type,model_sf_functional
|
||||
access_sf_functional_fixture,sf_functional_fixture,model_sf_functional_fixture,base.group_user,1,1,1,1
|
||||
access_sf_workpiece_clamping_wizard,sf_workpiece_clamping_wizard,model_sf_workpiece_clamping_wizard,base.group_user,1,1,1,1
|
||||
access_sf_stock_removal_wizard,sf_stock_removal_wizard,model_sf_stock_removal_wizard,base.group_user,1,1,1,1
|
||||
access_sf_assemble,sf_assemble,model_sf_assemble,base.group_user,1,1,1,1
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -1,131 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
|
||||
<!-- ===========================工件夹具====================================-->
|
||||
|
||||
<record model="ir.ui.view" id="search_sf_assemble_view">
|
||||
<field name="name">search.sf.assemble</field>
|
||||
<field name="model">sf.assemble</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="工件夹具">
|
||||
<field name="functional_fixture_code" string="编码"
|
||||
filter_domain="[('functional_fixture_code', 'ilike', self)]"/>
|
||||
<field name="name" string="名称"
|
||||
filter_domain="[('name', 'ilike', self)]"/>
|
||||
<!-- <field name="material_id" string="材质"-->
|
||||
<!-- filter_domain="[('material_id.name', 'ilike', self)]"/>-->
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="sf_assemble_view_tree" model="ir.ui.view">
|
||||
<field name="name">工件夹具</field>
|
||||
<field name="model">sf.assemble</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="工件夹具">
|
||||
<field name="functional_fixture_code"/>
|
||||
<field name="name"/>
|
||||
<field name="functional_fixture_type_id"/>
|
||||
<field name="chuck_type_id"/>
|
||||
<field name="chuck_name"/>
|
||||
<field name="chuck_brand_id"/>
|
||||
<field name="chuck_model_id"/>
|
||||
<field name="tray_type_id"/>
|
||||
<field name="tray_name"/>
|
||||
<field name="tray_brand_id"/>
|
||||
<field name="tray_model_id"/>
|
||||
<field name="maximum_carrying_weight"/>
|
||||
<field name="maximum_clamping_force"/>
|
||||
<field name="production_line"/>
|
||||
<field name="machine_tool"/>
|
||||
<field name="machine_tool_code"/>
|
||||
<field name="apply_staff"/>
|
||||
<field name="apply_time"/>
|
||||
<field name="apply_reason"/>
|
||||
<field name="preset_staff"/>
|
||||
<field name="preset_time"/>
|
||||
<field name="material_taker"/>
|
||||
<field name="material_removal_time"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="sf_assemble_view_form" model="ir.ui.view">
|
||||
<field name="name">工件夹具</field>
|
||||
<field name="model">sf.assemble</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="工件夹具">
|
||||
<header>
|
||||
<button type="action" name="%(action_workpiece_clamping_wizard)d" class="btn btn-info"
|
||||
string="装夹"/>
|
||||
<button type="action" name="%(action_stock_removal_wizard)d" class="btn btn-info"
|
||||
string="出库"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<group string="基本信息">
|
||||
<group>
|
||||
<field name="functional_fixture_code"/>
|
||||
<field name="functional_fixture_type_id"/>
|
||||
<field name="remark"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="装夹" name="clamping" attrs="{'invisible': [('chuck_type_id', '=', False)]}">
|
||||
<group>
|
||||
<group string="卡盘">
|
||||
<field name="chuck_type_id"></field>
|
||||
<field name="chuck_name"></field>
|
||||
<field name="chuck_brand_id"></field>
|
||||
<field name="chuck_model_id"></field>
|
||||
</group>
|
||||
<group string="托盘">
|
||||
<field name="tray_type_id"></field>
|
||||
<field name="tray_name"></field>
|
||||
<field name="tray_brand_id"></field>
|
||||
<field name="tray_model_id"></field>
|
||||
</group>
|
||||
<group string="坯料">
|
||||
<field name="real_code" string="坯料编码"></field>
|
||||
<field name="real_name" string="坯料名称"></field>
|
||||
<label for="real_length" string="尺寸[mm]"/>
|
||||
<div class="o_address_format">
|
||||
<label for="real_length" string="长"/>
|
||||
<field name="real_length" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="real_width" string="宽"/>
|
||||
<field name="real_width" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="real_height" string="高"/>
|
||||
<field name="real_height" class="o_address_zip"
|
||||
options="{'format': false}"/>
|
||||
</div>
|
||||
<field name="real_diameter" string="直径[mm]"></field>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page string="出库" name="stock_removal"
|
||||
attrs="{'invisible': [('production_line', '=', False)]}">
|
||||
<group>
|
||||
<field name="production_line"></field>
|
||||
<field name="machine_tool" string="机台"></field>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="sf_assemble_view_act" model="ir.actions.act_window">
|
||||
<field name="name">工件夹具</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">sf.assemble</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -82,7 +82,7 @@
|
||||
<tree string="功能夹具">
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="functional_fixture_type_id"/>
|
||||
<field name="type_id"/>
|
||||
<field name="zero_chuck_model_ids" widget="many2many_tags"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -98,7 +98,7 @@
|
||||
<group>
|
||||
<field name="code" force_save="1"/>
|
||||
<field name="name"/>
|
||||
<field name="functional_fixture_type_id"/>
|
||||
<field name="type_id"/>
|
||||
<field name="zero_chuck_model_ids" widget="many2many_tags"/>
|
||||
<field name="transfer_tray_model_ids" widget="many2many_tags"/>
|
||||
<field name="pneumatic_tray_model_ids" widget="many2many_tags"/>
|
||||
|
||||
@@ -38,11 +38,4 @@
|
||||
name="功能夹具"
|
||||
sequence="4"
|
||||
/>
|
||||
|
||||
<menuitem id="menu_sf_assemble"
|
||||
parent="menu_sf_fixture"
|
||||
action="sf_assemble_view_act"
|
||||
name="工件装夹"
|
||||
sequence="5"
|
||||
/>
|
||||
</odoo>
|
||||
@@ -6,6 +6,7 @@ from odoo import api, fields, models, _
|
||||
class MrpProduction(models.Model):
|
||||
_inherit = 'mrp.production'
|
||||
_description = "制造订单"
|
||||
_order = 'create_date desc'
|
||||
|
||||
tray_ids = fields.One2many('sf.tray', 'production_id', string="托盘")
|
||||
maintenance_count = fields.Integer(compute='_compute_maintenance_count', string="Number of maintenance requests")
|
||||
|
||||
@@ -16,7 +16,7 @@ from odoo.addons.sf_mrs_connect.models.ftp_operate import FtpController
|
||||
|
||||
class ResMrpWorkOrder(models.Model):
|
||||
_inherit = 'mrp.workorder'
|
||||
_order = 'sequence'
|
||||
_order = 'sequence asc,create_date desc'
|
||||
|
||||
product_tmpl_id_length = fields.Float(related='production_id.product_tmpl_id.length', readonly=True, store=True,
|
||||
check_company=True, string="坯料长度(mm)")
|
||||
@@ -108,6 +108,33 @@ class ResMrpWorkOrder(models.Model):
|
||||
supplier_id = fields.Many2one('res.partner', string='外协供应商')
|
||||
equipment_id = fields.Many2one('maintenance.equipment', string='加工设备')
|
||||
schedule_state = fields.Selection(related='production_id.schedule_state', store=True)
|
||||
# 工件装夹信息
|
||||
functional_fixture_code = fields.Char(string="功能夹具编码", readonly=True)
|
||||
functional_fixture_serial_number = fields.Char(string="功能夹具序列号", readonly=True)
|
||||
functional_fixture_id = fields.Many2one('sf.functional.fixture', string="功能夹具")
|
||||
functional_fixture_type_id = fields.Many2one('sf.functional.fixture.type', string="功能夹具类型", readonly=True)
|
||||
chuck_serial_number = fields.Char(string="卡盘序列号")
|
||||
chuck_name = fields.Char(string="卡盘名称")
|
||||
chuck_brand_id = fields.Many2one('sf.machine.brand', string="卡盘品牌")
|
||||
chuck_type_id = fields.Char(string="卡盘类型")
|
||||
chuck_model_id = fields.Char(string="卡盘型号")
|
||||
tray_serial_number = fields.Char(string="卡盘序列号")
|
||||
tray_name = fields.Char(string="托盘名称")
|
||||
tray_brand_id = fields.Many2one('sf.machine.brand', string="托盘品牌")
|
||||
tray_type_id = fields.Char(string="托盘类型")
|
||||
tray_model_id = fields.Char(string="托盘型号")
|
||||
total_wight = fields.Float(string="总重量")
|
||||
maximum_carrying_weight = fields.Char(string="最大承载重量[kg]")
|
||||
maximum_clamping_force = fields.Char(string="最大夹持力[n]")
|
||||
production_line = fields.Char(string="生产线")
|
||||
preset_program_information = fields.Char(string="预调程序信息")
|
||||
|
||||
@api.onchange('functional_fixture_id')
|
||||
def _onchange_functional_fixture_id(self):
|
||||
if self.functional_fixture_id:
|
||||
self.functional_fixture_code = self.functional_fixture_id.code
|
||||
self.functional_fixture_type_id = self.functional_fixture_id.type_id.id
|
||||
|
||||
|
||||
def get_no_data(self, production_id):
|
||||
process_parameter_workorder = self.search(
|
||||
@@ -524,18 +551,6 @@ class ResMrpWorkOrder(models.Model):
|
||||
})
|
||||
super().button_finish()
|
||||
|
||||
def action_view_schedule_tree(self):
|
||||
# 执行打开树视图的操作(已排程的工单)
|
||||
return {
|
||||
'name': 'Schedule Work Order Tree',
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_model': 'mrp.workorder',
|
||||
'target': 'current',
|
||||
'view_mode': 'tree',
|
||||
'views': [[self.env.ref('mrp.mrp_production_workorder_tree_editable_view').id], 'tree'],
|
||||
'domain': [('schedule_state', '=', '已排')],
|
||||
}
|
||||
|
||||
|
||||
class CNCprocessing(models.Model):
|
||||
_name = 'sf.cnc.processing'
|
||||
|
||||
@@ -95,39 +95,6 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- <record model="ir.actions.act_window" id="mrp_workorder_action_scheduled">-->
|
||||
<!-- <field name="name">工单</field>-->
|
||||
<!-- <field name="type">ir.actions.act_window</field>-->
|
||||
<!-- <field name="res_model">mrp.workorder</field>-->
|
||||
<!-- <field name="view_mode">tree,kanban,form</field>-->
|
||||
<!-- <field name="view_id" ref="view_mrp_production_workorder_tree_editable_inherit_sf"/>-->
|
||||
|
||||
<!-- <!– <field name="view_ids" eval="[(5, 0, 0),–>-->
|
||||
<!-- <!– (0, 0, {'view_mode': 'tree', 'view_id': ref('mrp.mrp_production_workorder_tree_view')}),–>-->
|
||||
<!-- <!– (0, 0, {'view_mode': 'kanban', 'view_id': ref('mrp.workcenter_line_kanban')}) ]"/>–>-->
|
||||
<!-- <!– <field name="target">fullscreen</field>–>-->
|
||||
<!-- <!– <field name="search_view_id" ref="mrp.view_mrp_production_workorder_form_view_filter"/>–>-->
|
||||
<!-- <!– <field name="domain">[('state', '!=', 'cancel'),('schedule_state', '=', '已排')]</field>–>-->
|
||||
<!-- <!– <field name="context">{'search_default_workcenter_id': active_id}</field>–>-->
|
||||
<!-- <field name="help" type="html">-->
|
||||
<!-- <p class="o_view_nocontent_workorder">-->
|
||||
<!-- 没有已排程的工单!-->
|
||||
<!-- </p>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
|
||||
<!-- <record model="ir.ui.view" id="view_mrp_production_workorder_form_inherit_sf">-->
|
||||
<!-- <field name="name">mrp.production.workorder.form.inherit.sf</field>-->
|
||||
<!-- <field name="model">mrp.workorder</field>-->
|
||||
<!-- <field name="inherit_id" ref="mrp.mrp_production_workorder_form_view_inherit"/>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <field name="production_id" position="after">-->
|
||||
<!-- <field name="processing_panel" readonly="1"/>-->
|
||||
<!-- </field>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<record id="view_mrp_production_workorder_tray_form_inherit_sf" model="ir.ui.view">
|
||||
<field name="name">mrp.production.workorder.tray.form.inherit.sf</field>
|
||||
<field name="model">mrp.workorder</field>
|
||||
@@ -137,6 +104,7 @@
|
||||
|
||||
<field name='user_permissions' invisible="1"/>
|
||||
<field name='name' invisible="1"/>
|
||||
<field name='routing_type' invisible="1"/>
|
||||
<button name="button_start" type="object" string="开始" class="btn-success"
|
||||
attrs="{'invisible': ['|', '|', '|','|','|', ('production_state','in', ('draft', 'done',
|
||||
'cancel')), ('working_state', '=', 'blocked'), ('state', 'in', ('done', 'cancel')),
|
||||
@@ -156,7 +124,9 @@
|
||||
<!-- <attribute name="invisible">1</attribute>-->
|
||||
<!-- </xpath>-->
|
||||
<!-- 隐藏物料清单-->
|
||||
|
||||
<xpath expr="//page[@name='components']" position="attributes">
|
||||
<attribute name="string">物料</attribute>
|
||||
</xpath>
|
||||
<field name="production_id" position="after" invisible="0">
|
||||
<group>
|
||||
<field name="date_planned_start" invisible="1"/>
|
||||
@@ -169,7 +139,12 @@
|
||||
attrs='{"invisible": [("routing_type","in",("获取CNC加工程序","切割"))]}'/>
|
||||
<field name="equipment_id"
|
||||
attrs='{"invisible": [("routing_type","in",("获取CNC加工程序","切割"))]}'/>
|
||||
|
||||
<field name="functional_fixture_id"
|
||||
attrs='{"invisible": [("routing_type","!=","装夹")]}'/>
|
||||
<field name="functional_fixture_code" force_save="1"
|
||||
attrs='{"invisible": [("routing_type","!=","装夹")]}'/>
|
||||
<field name="functional_fixture_type_id" force_save="1"
|
||||
attrs='{"invisible": [("routing_type","!=","装夹")]}'/>
|
||||
</group>
|
||||
<group attrs='{"invisible": [("routing_type","=","获取CNC加工程序")]}'>
|
||||
<div>
|
||||
@@ -197,33 +172,52 @@
|
||||
/>
|
||||
</div>
|
||||
</group>
|
||||
|
||||
|
||||
</page>
|
||||
|
||||
</xpath>
|
||||
<!-- <page string="Components" name="components">-->
|
||||
<xpath expr="//page[1]" position="before">
|
||||
<page string="装夹托盘" attrs='{"invisible": [("routing_type","!=","装夹")]}'>
|
||||
<group>
|
||||
<field name="routing_type" invisible="1"/>
|
||||
<field name="tray_code"/>
|
||||
<field name="tray_id" readonly="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="pro_code" readonly="1" attrs='{"invisible": [("pro_code_ok","=",False)]}'
|
||||
style="color:green"/>
|
||||
<field name="pro_code" readonly="1" attrs='{"invisible": [("pro_code_ok","!=",False)]}'/>
|
||||
<div>
|
||||
<field name="pro_code_ok" invisible="1"/>
|
||||
</div>
|
||||
<!-- <page string="装夹托盘" attrs='{"invisible": [("routing_type","!=","装夹")]}'>-->
|
||||
<!-- <group>-->
|
||||
<!-- <field name="routing_type" invisible="1"/>-->
|
||||
<!-- <field name="tray_code"/>-->
|
||||
<!-- <field name="tray_id" readonly="1"/>-->
|
||||
<!-- </group>-->
|
||||
<!-- <group>-->
|
||||
<!-- <field name="pro_code" readonly="1" attrs='{"invisible": [("pro_code_ok","=",False)]}'-->
|
||||
<!-- style="color:green"/>-->
|
||||
<!-- <field name="pro_code" readonly="1" attrs='{"invisible": [("pro_code_ok","!=",False)]}'/>-->
|
||||
<!-- <div>-->
|
||||
<!-- <field name="pro_code_ok" invisible="1"/>-->
|
||||
<!-- </div>-->
|
||||
|
||||
</group>
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<button type="object" class="oe_highlight" name="gettray" string="绑定托盘"
|
||||
attrs='{"invisible": ["|","|",("tray_id","!=",False),("state","!=","progress"),("production_id","=",False)]}'/>
|
||||
<!-- </group>-->
|
||||
<!-- <div class="col-12 col-lg-6 o_setting_box">-->
|
||||
<!-- <button type="object" class="oe_highlight" name="gettray" string="绑定托盘"-->
|
||||
<!-- attrs='{"invisible": ["|","|",("tray_id","!=",False),("state","!=","progress"),("production_id","=",False)]}'/>-->
|
||||
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
<!-- </page>-->
|
||||
<page string="工件装夹" attrs='{"invisible": [("routing_type","!=","装夹")]}'>
|
||||
<group>
|
||||
<group string="卡盘">
|
||||
<field name="chuck_serial_number"/>
|
||||
<field name="chuck_name"/>
|
||||
<field name="chuck_brand_id"/>
|
||||
<field name="chuck_type_id"/>
|
||||
<field name="chuck_model_id"/>
|
||||
</group>
|
||||
<group string="托盘">
|
||||
<field name="tray_serial_number"/>
|
||||
<field name="tray_name"/>
|
||||
<field name="tray_brand_id"/>
|
||||
<field name="tray_type_id"/>
|
||||
<field name="tray_model_id"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="预调程序信息">
|
||||
<field name="preset_program_information" colspan="2" nolabel="1"
|
||||
placeholder="如有预调程序信息请在此处输入....."/>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
</xpath>
|
||||
@@ -440,34 +434,24 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="mrp_workorder_action_schedule" model="ir.actions.act_window">
|
||||
<field name="name">工单</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.workorder</field>
|
||||
<field name="view_mode">tree,kanban,form</field>
|
||||
<field name="view_id" eval="mrp.mrp_production_workorder_tree_editable_view"/>
|
||||
<field name="view_id" ref="mrp.mrp_production_workorder_tree_editable_view"/>
|
||||
<field name="search_view_id" ref="mrp.view_mrp_production_work_order_search"/>
|
||||
<field name="domain">[('schedule_state', '=', '已排')]</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_mrp_workorder_schedule_todo"
|
||||
name="工单1"
|
||||
name="工单"
|
||||
action="mrp_workorder_action_schedule"
|
||||
parent="mrp.menu_mrp_manufacturing"
|
||||
sequence="15"/>
|
||||
|
||||
<!-- <record id="action_schedule_workorder_tree" model="ir.actions.server">-->
|
||||
<!-- <field name="name">View Schedule Work Order Tree</field>-->
|
||||
<!-- <field name="model_id" ref="model_mrp_workorder"/>-->
|
||||
<!-- <field name="state">code</field>-->
|
||||
<!-- <field name="code">model.action_view_schedule_tree()</field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<!-- <record id="menu_schedule_workorder_tree" model="ir.ui.menu">-->
|
||||
<!-- <field name="name">schedule Work Order Tree</field>-->
|
||||
<!-- <field name="action" ref="action_schedule_workorder_tree"/>-->
|
||||
<!-- <field name="sequence" eval="16"/>-->
|
||||
<!-- </record>-->
|
||||
<record id="mrp.menu_mrp_workorder_todo" model="ir.ui.menu">
|
||||
<field name="active" eval="False"/>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
|
||||
@@ -1771,7 +1771,7 @@ class SyncFunctionalFixture(models.Model):
|
||||
self.env['sf.functional.fixture'].create({
|
||||
"name": item['name'],
|
||||
"code": item['code'],
|
||||
"functional_fixture_type_id": self.env['sf.functional.fixture.type'].search(
|
||||
"type_id": self.env['sf.functional.fixture.type'].search(
|
||||
[("code", '=', item['functional_fixture_type_code'])]).id,
|
||||
"zero_chuck_model_ids": self._get_fixture_model_ids(item['zero_chuck_model_codes']),
|
||||
"transfer_tray_model_ids": self._get_fixture_model_ids(
|
||||
@@ -1785,7 +1785,7 @@ class SyncFunctionalFixture(models.Model):
|
||||
else:
|
||||
functional_fixture.write({
|
||||
"name": item['name'],
|
||||
"functional_fixture_type_id": self.env['sf.functional.fixture.type'].search(
|
||||
"type_id": self.env['sf.functional.fixture.type'].search(
|
||||
[("code", '=', item['functional_fixture_type_code'])]).id,
|
||||
"zero_chuck_model_ids": self._get_fixture_model_ids(item['zero_chuck_model_codes']),
|
||||
"transfer_tray_model_ids": self._get_fixture_model_ids(
|
||||
@@ -1820,7 +1820,7 @@ class SyncFunctionalFixture(models.Model):
|
||||
self.env['sf.functional.fixture'].create({
|
||||
"name": item['name'],
|
||||
"code": item['code'],
|
||||
"functional_fixture_type_id": self.env['sf.functional.fixture.type'].search(
|
||||
"type_id": self.env['sf.functional.fixture.type'].search(
|
||||
[("code", '=', item['functional_fixture_type_code'])]).id,
|
||||
"zero_chuck_model_ids": self._get_fixture_model_ids(item['zero_chuck_model_codes']),
|
||||
"transfer_tray_model_ids": self._get_fixture_model_ids(
|
||||
@@ -1834,7 +1834,7 @@ class SyncFunctionalFixture(models.Model):
|
||||
else:
|
||||
functional_fixture.write({
|
||||
"name": item['name'],
|
||||
"functional_fixture_type_id": self.env['sf.functional.fixture.type'].search(
|
||||
"type_id": self.env['sf.functional.fixture.type'].search(
|
||||
[("code", '=', item['functional_fixture_type_code'])]).id,
|
||||
"zero_chuck_model_ids": self._get_fixture_model_ids(item['zero_chuck_model_codes']),
|
||||
"transfer_tray_model_ids": self._get_fixture_model_ids(
|
||||
|
||||
Reference in New Issue
Block a user