Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/订单计划
# Conflicts: # sf_maintenance/__manifest__.py # sf_manufacturing/views/mrp_workcenter_views.xml
This commit is contained in:
@@ -91,8 +91,8 @@
|
||||
<xpath expr="//field[@name='company_id']" position="after">
|
||||
<field name="users_ids" widget="many2many_tags" string="可操作用户"/>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//field[@name='alternative_workcenter_ids']" position="after">
|
||||
<field name="production_line_id"/>
|
||||
<field name="equipment_id"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='resource_calendar_id']" position="after">
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<field name="name" position="replace">
|
||||
<field name="is_subcontract" invisible="1"/>
|
||||
|
||||
<field name="name" decoration-success="is_subcontract" decoration-bf="is_subcontract"/>
|
||||
</field>
|
||||
<field name="name" position="before">
|
||||
@@ -19,6 +20,9 @@
|
||||
<field name="state" position="after">
|
||||
<field name="work_state" optional="hide"/>
|
||||
</field>
|
||||
<field name="product_id" position="after">
|
||||
<field name="equipment_id" optional="hide"/>
|
||||
</field>
|
||||
<xpath expr="//field[@name='date_planned_start']" position="replace">
|
||||
<field name="date_planned_start" string="计划开始日期" optional="show"/>
|
||||
</xpath>
|
||||
@@ -73,7 +77,7 @@
|
||||
(0, 0, {'view_mode': 'kanban', 'view_id': ref('mrp.workcenter_line_kanban')}) ]"/>
|
||||
<!-- <field name="target">fullscreen</field>-->
|
||||
<field name="target">current</field>
|
||||
<field name="domain">[('state', '!=', 'cancel')]</field>
|
||||
<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">
|
||||
@@ -91,17 +95,6 @@
|
||||
</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>
|
||||
@@ -111,13 +104,15 @@
|
||||
|
||||
<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')),
|
||||
('is_user_working', '!=', False),('user_permissions','=',False),('name','=','获取CNC加工程序')]}"/>
|
||||
<button name="button_pending" type="object" string="暂停" class="btn-warning"
|
||||
attrs="{'invisible': ['|', '|','|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '=', 'blocked'), ('is_user_working', '=', False),('name','=','获取CNC加工程序')]}"/>
|
||||
<button name="button_finish" type="object" string="完成" class="btn-success"/>
|
||||
<button name="button_finish" type="object" string="完成" class="btn-success"
|
||||
attrs="{'invisible': ['|', '|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '=', 'blocked'), ('is_user_working', '=', False)]}"/>
|
||||
<button name="%(mrp.act_mrp_block_workcenter_wo)d" type="action" string="停工"
|
||||
context="{'default_workcenter_id': workcenter_id}" class="btn-danger"
|
||||
attrs="{'invisible': ['|', '|','|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '=', 'blocked'),('user_permissions','=',False),('name','=','获取CNC加工程序')]}"/>
|
||||
@@ -125,12 +120,15 @@
|
||||
context="{'default_workcenter_id': workcenter_id}" class="btn-danger"
|
||||
attrs="{'invisible': ['|', '|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '!=', 'blocked'),('name','=','获取CNC加工程序')]}"/>
|
||||
</xpath>
|
||||
<!-- 隐藏物料清单-->
|
||||
<!-- <xpath expr="//page[@name='components']" position="attributes">-->
|
||||
<!-- <attribute name="invisible">1</attribute>-->
|
||||
<!-- </xpath>-->
|
||||
<!-- 隐藏物料清单-->
|
||||
|
||||
<!-- 隐藏物料清单-->
|
||||
<!-- <xpath expr="//page[@name='components']" position="attributes">-->
|
||||
<!-- <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"/>
|
||||
@@ -141,6 +139,14 @@
|
||||
sum="real duration"/>
|
||||
<field name="processing_panel" readonly="1"
|
||||
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>
|
||||
@@ -165,36 +171,55 @@
|
||||
<group>
|
||||
<div class="col-12 col-lg-6 o_setting_box" style="white-space: nowrap">
|
||||
<button type="object" class="oe_highlight" name="fetchCNC" string="获取CNC程序代码"
|
||||
/>
|
||||
/>
|
||||
</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>
|
||||
@@ -410,5 +435,25 @@
|
||||
</xpath>
|
||||
</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" 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="工单"
|
||||
action="mrp_workorder_action_schedule"
|
||||
parent="mrp.menu_mrp_manufacturing"
|
||||
sequence="15"/>
|
||||
|
||||
<record id="mrp.menu_mrp_workorder_todo" model="ir.ui.menu">
|
||||
<field name="active" eval="False"/>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
|
||||
81
sf_manufacturing/views/production_line_view.xml
Normal file
81
sf_manufacturing/views/production_line_view.xml
Normal file
@@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="sf_production_line_tree" model="ir.ui.view">
|
||||
<field name="name">生产线</field>
|
||||
<field name="model">sf.production.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="生产线">
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="remark"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="sf_production_line_form" model="ir.ui.view">
|
||||
<field name="name">生产线</field>
|
||||
<field name="model">sf.production.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="生产线">
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="remark"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="code"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="sf_production_line_search" model="ir.ui.view">
|
||||
<field name="name">生产线</field>
|
||||
<field name="model">sf.production.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="sf_production_line_kanban" model="ir.ui.view">
|
||||
<field name="name">生产线看板</field>
|
||||
<field name="model">sf.production.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban>
|
||||
<field name="name"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div class="oe_kanban_global_click">
|
||||
<!-- 在这里定义每个卡片的内容 -->
|
||||
<div>
|
||||
<strong><field name="code"/></strong>
|
||||
<br/>
|
||||
<span><field name="name"/></span>
|
||||
<br/>
|
||||
<span><field name="remark"/></span>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="sf_production_line_act" model="ir.actions.act_window">
|
||||
<field name="name">生产线</field>
|
||||
<field name="res_model">sf.production.line</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_sf_production_line"
|
||||
parent="sf_base.menu_sf_base"
|
||||
name="生产线"
|
||||
sequence="20"
|
||||
action="sf_production_line_act"/>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user