删除制造订单处排程相关的部分,排程模块架构改造完成
This commit is contained in:
@@ -1,101 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="sf_pl_plan_tree" model="ir.ui.view">
|
||||
<field name="name">sf.pl.plan.tree</field>
|
||||
<field name="model">sf.pl.plan</field>
|
||||
<record id="sf_production_plan_tree" model="ir.ui.view">
|
||||
<field name="name">sf.production.plan.tree</field>
|
||||
<field name="model">sf.production.plan</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="坯料预制计划">
|
||||
<tree string="订单计划">
|
||||
<!-- sequence、pl_no、pl_name、quantity、plan_start_time、plan_end_time、actual_start_time、actual_end_time、state、create_uid、create_date -->
|
||||
<field name="sequence"/>
|
||||
<field name="pl_no"/>
|
||||
<field name="pl_name"/>
|
||||
<field name="name"/>
|
||||
<field name="quantity"/>
|
||||
<field name="plan_start_time"/>
|
||||
<field name="plan_end_time"/>
|
||||
<field name="state"/>
|
||||
<field name="create_uid" string="创建人"/>
|
||||
<field name="create_date" string="创建时间"/>
|
||||
<button name="do_production_schedule" string="生产排程" type="object" attrs="{'invisible': [('state', 'not in', ['draft'])]}"/>
|
||||
<button name="cancel_production_schedule" string="取消排程" type="object" attrs="{'invisible': [('state', 'not in', ['produce'])]}"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="sf_pl_plan_form" model="ir.ui.view">
|
||||
<field name="name">sf.pl.plan.form</field>
|
||||
<field name="model">sf.pl.plan</field>
|
||||
<record id="sf_production_plan_form" model="ir.ui.view">
|
||||
<field name="name">sf.production.plan.form</field>
|
||||
<field name="model">sf.production.plan</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="坯料预制计划">
|
||||
<form string="订单计划">
|
||||
<header>
|
||||
<button string="执行排程" name="get_plan_end_time" type="object" class="oe_highlight"/>
|
||||
<button string="执行排程" name="do_production_schedule" type="object" class="oe_highlight"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,produce"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="pl_no" readonly="1"/>
|
||||
<field name="name" readonly="1"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group string="基本信息">
|
||||
<field name="pl_no"/>
|
||||
<field name="pl_name"/>
|
||||
<field name="name"/>
|
||||
<field name="quantity"/>
|
||||
<field name="plan_start_time"/>
|
||||
<field name="plan_end_time"/>
|
||||
<field name="state"/>
|
||||
<field name="production_line_id"/>
|
||||
</group>
|
||||
<group string="规格信息" col="1">
|
||||
<group col="3">
|
||||
<group>
|
||||
<field name="length"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="width"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="thickness"/>
|
||||
</group>
|
||||
</group>
|
||||
<!-- <group string="规格信息" col="1"> -->
|
||||
<!-- <group col="3"> -->
|
||||
<!-- <group> -->
|
||||
<!-- <field name="length"/> -->
|
||||
<!-- </group> -->
|
||||
<!-- <group> -->
|
||||
<!-- <field name="width"/> -->
|
||||
<!-- </group> -->
|
||||
<!-- <group> -->
|
||||
<!-- <field name="thickness"/> -->
|
||||
<!-- </group> -->
|
||||
<!-- </group> -->
|
||||
<!-- <field name="length"/> -->
|
||||
<!-- <field name="width"/> -->
|
||||
<!-- <field name="thickness"/> -->
|
||||
<group>
|
||||
<field name="diameter"/>
|
||||
<field name="material"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="绑定订单">
|
||||
<field name="customer_name"/>
|
||||
<field name="order_no"/>
|
||||
<field name="line_no"/>
|
||||
<field name="delivery_length"/>
|
||||
<field name="delivery_width"/>
|
||||
<field name="delivery_thickness"/>
|
||||
<field name="delivery_diameter"/>
|
||||
<field name="delivery_quantity"/>
|
||||
<field name="delivery_date"/>
|
||||
</group>
|
||||
<!-- <group> -->
|
||||
<!-- <field name="diameter"/> -->
|
||||
<!-- <field name="material"/> -->
|
||||
<!-- </group> -->
|
||||
<!-- </group> -->
|
||||
<!-- <group string="绑定订单"> -->
|
||||
<!-- <field name="customer_name"/> -->
|
||||
<!-- <field name="order_no"/> -->
|
||||
<!-- <field name="line_no"/> -->
|
||||
<!-- <field name="delivery_length"/> -->
|
||||
<!-- <field name="delivery_width"/> -->
|
||||
<!-- <field name="delivery_thickness"/> -->
|
||||
<!-- <field name="delivery_diameter"/> -->
|
||||
<!-- <field name="delivery_quantity"/> -->
|
||||
<!-- <field name="delivery_date"/> -->
|
||||
<!-- </group> -->
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="sf_pl_plan_gantt" model="ir.ui.view">
|
||||
<field name="name">sf.pl.plan.gantt</field>
|
||||
<field name="model">sf.pl.plan</field>
|
||||
<!-- 搜索视图 -->
|
||||
<record id="sf_production_plan_search" model="ir.ui.view">
|
||||
<field name="name">sf.production.plan.search</field>
|
||||
<field name="model">sf.production.plan</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="订单计划">
|
||||
<field name="name"/>
|
||||
<field name="quantity"/>
|
||||
<field name="plan_start_time"/>
|
||||
<field name="plan_end_time"/>
|
||||
<field name="state"/>
|
||||
<searchpanel class="account_root">
|
||||
<field name="state" icon="fa-filter"/>
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="sf_production_plan_gantt" model="ir.ui.view">
|
||||
<field name="name">sf.production.plan.gantt</field>
|
||||
<field name="model">sf.production.plan</field>
|
||||
<field name="arch" type="xml">
|
||||
<gantt class="o_mrp_workorder_gantt" date_stop="plan_end_time" date_start="plan_start_time"
|
||||
string="制造订单生产计划" default_group_by="production_line_id" create="0"
|
||||
delete="0" sample="1"
|
||||
display_unavailability="1"
|
||||
color="state"
|
||||
progress_bar="pl_name"
|
||||
form_view_id="sf_pl_plan_form">
|
||||
color="production_line_id"
|
||||
decoration-success="state == 'done'"
|
||||
progress_bar="name"
|
||||
form_view_id="sf_production_plan_form">
|
||||
|
||||
<field name="pl_no"/>
|
||||
<field name="pl_name"/>
|
||||
<field name="name"/>
|
||||
<field name="quantity"/>
|
||||
<field name="plan_start_time"/>
|
||||
<field name="plan_end_time"/>
|
||||
@@ -114,21 +130,13 @@
|
||||
<t t-out="userTimezoneStopDate.format('L LTS')"/>
|
||||
</li>
|
||||
<li>
|
||||
<strong>坯料编号:</strong>
|
||||
<t t-out="pl_no"/>
|
||||
</li>
|
||||
<li>
|
||||
<strong>坯料名称:</strong>
|
||||
<t t-out="pl_name"/>
|
||||
<strong>名称:</strong>
|
||||
<t t-out="name"/>
|
||||
</li>
|
||||
<li>
|
||||
<strong>数量:</strong>
|
||||
<t t-out="quantity"/>
|
||||
</li>
|
||||
<li>
|
||||
<strong>材质:</strong>
|
||||
<t t-out="material"/>
|
||||
</li>
|
||||
<li>
|
||||
<strong>状态:</strong>
|
||||
<t t-out="state"/>
|
||||
@@ -149,70 +157,70 @@
|
||||
<!-- <field name="res_model">sf.pl.plan</field> -->
|
||||
<!-- <field name="view_mode">tree,form,gantt</field> -->
|
||||
<!-- </record> -->
|
||||
<record id="sf_production_gantt_view" model="ir.ui.view">
|
||||
<field name="name">sf.production.plan.gantt</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="arch" type="xml">
|
||||
<gantt class="o_mrp_workorder_gantt" date_stop="date_planned_finished" date_start="date_planned_start"
|
||||
string="制造订单生产计划" default_group_by="production_line_id" create="0"
|
||||
delete="0" sample="1" plan="0"
|
||||
display_unavailability="1"
|
||||
decoration-success="state == 'done'"
|
||||
decoration-secondary="state == 'cancel'"
|
||||
color="production_line_id"
|
||||
progress_bar="state"
|
||||
form_view_id="mrp.mrp_production_form_view">
|
||||
<field name="name"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="date_planned_start"/>
|
||||
<field name="date_planned_finished" string="计划结束时间"/>
|
||||
<field name="state"/>
|
||||
<templates>
|
||||
<div t-name="gantt-popover" class="container-fluid">
|
||||
<div class="row g-0">
|
||||
<div class="col">
|
||||
<ul class="ps-1 mb-0 list-unstyled">
|
||||
<li>
|
||||
<strong>开始时间:</strong>
|
||||
<t t-out="userTimezoneStartDate.format('L LTS')"/>
|
||||
</li>
|
||||
<li>
|
||||
<strong>结束时间:</strong>
|
||||
<t t-out="userTimezoneStopDate.format('L LTS')"/>
|
||||
</li>
|
||||
<li>
|
||||
<strong>数量:</strong>
|
||||
<t t-out="product_qty"/>
|
||||
</li>
|
||||
<li>
|
||||
<strong>状态:</strong>
|
||||
<t t-if="state === 'cancel'">已取消</t>
|
||||
<t t-elif="state === 'done'">已完成</t>
|
||||
<t t-elif="state === '已排程'">已排程</t>
|
||||
<t t-else="">其他状态</t>
|
||||
<!-- <record id="sf_production_gantt_view" model="ir.ui.view"> -->
|
||||
<!-- <field name="name">sf.production.plan.gantt</field> -->
|
||||
<!-- <field name="model">mrp.production</field> -->
|
||||
<!-- <field name="arch" type="xml"> -->
|
||||
<!-- <gantt class="o_mrp_workorder_gantt" date_stop="date_planned_finished" date_start="date_planned_start" -->
|
||||
<!-- string="制造订单生产计划" default_group_by="production_line_id" create="0" -->
|
||||
<!-- delete="0" sample="1" plan="0" -->
|
||||
<!-- display_unavailability="1" -->
|
||||
<!-- decoration-success="state == 'done'" -->
|
||||
<!-- decoration-secondary="state == 'cancel'" -->
|
||||
<!-- color="production_line_id" -->
|
||||
<!-- progress_bar="state" -->
|
||||
<!-- form_view_id="mrp.mrp_production_form_view"> -->
|
||||
<!-- <field name="name"/> -->
|
||||
<!-- <field name="product_qty"/> -->
|
||||
<!-- <field name="date_planned_start"/> -->
|
||||
<!-- <field name="date_planned_finished" string="计划结束时间"/> -->
|
||||
<!-- <field name="state"/> -->
|
||||
<!-- <templates> -->
|
||||
<!-- <div t-name="gantt-popover" class="container-fluid"> -->
|
||||
<!-- <div class="row g-0"> -->
|
||||
<!-- <div class="col"> -->
|
||||
<!-- <ul class="ps-1 mb-0 list-unstyled"> -->
|
||||
<!-- <li> -->
|
||||
<!-- <strong>开始时间:</strong> -->
|
||||
<!-- <t t-out="userTimezoneStartDate.format('L LTS')"/> -->
|
||||
<!-- </li> -->
|
||||
<!-- <li> -->
|
||||
<!-- <strong>结束时间:</strong> -->
|
||||
<!-- <t t-out="userTimezoneStopDate.format('L LTS')"/> -->
|
||||
<!-- </li> -->
|
||||
<!-- <li> -->
|
||||
<!-- <strong>数量:</strong> -->
|
||||
<!-- <t t-out="product_qty"/> -->
|
||||
<!-- </li> -->
|
||||
<!-- <li> -->
|
||||
<!-- <strong>状态:</strong> -->
|
||||
<!-- <t t-if="state === 'cancel'">已取消</t> -->
|
||||
<!-- <t t-elif="state === 'done'">已完成</t> -->
|
||||
<!-- <t t-elif="state === '已排程'">已排程</t> -->
|
||||
<!-- <t t-else="">其他状态</t> -->
|
||||
<!-- <t t-out="state"/> -->
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</templates>
|
||||
</gantt>
|
||||
</field>
|
||||
</record>
|
||||
<record id="sf_pl_plan_action" model="ir.actions.act_window">
|
||||
<!-- </li> -->
|
||||
<!-- </ul> -->
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
<!-- </templates> -->
|
||||
<!-- </gantt> -->
|
||||
<!-- </field> -->
|
||||
<!-- </record> -->
|
||||
<record id="sf_production_plan_action" model="ir.actions.act_window">
|
||||
<field name="name">制造订单生产计划</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">mrp.production</field>
|
||||
<field name="res_model">sf.production.plan</field>
|
||||
<field name="view_mode">gantt,tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="sf_pl_plan_menu"
|
||||
id="sf_production_plan_menu"
|
||||
name="制造订单生产计划"
|
||||
parent="mrp_workorder.mrp_workorder_menu_planning"
|
||||
sequence="10"
|
||||
action="sf_pl_plan_action"
|
||||
action="sf_production_plan_action"
|
||||
/>
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user