修改计划-生产订单列表只显示制造订单
This commit is contained in:
@@ -22,10 +22,3 @@ class MrpProduction(models.Model):
|
|||||||
wo.current_quality_check_id._update_component_quantity()
|
wo.current_quality_check_id._update_component_quantity()
|
||||||
return productions
|
return productions
|
||||||
|
|
||||||
@api.model
|
|
||||||
def web_search_read(self, domain=None, fields=None, offset=0, limit=None, order=None, count_limit=None):
|
|
||||||
picking_type = self.env['stock.picking.type'].search([('name', 'ilike', '制造')])
|
|
||||||
if picking_type:
|
|
||||||
domain.append(('picking_type_id', 'in', picking_type.ids))
|
|
||||||
records = super(MrpProduction, self).web_search_read(domain, fields, offset, limit, order, count_limit)
|
|
||||||
return records
|
|
||||||
|
|||||||
@@ -1,41 +1,44 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<odoo>
|
<odoo>
|
||||||
<!-- Manufacturing Order for Planing view -->
|
<!-- Manufacturing Order for Planing view -->
|
||||||
<record id="mrp_production_tree_view_planning" model="ir.ui.view">
|
<record id="mrp_production_tree_view_planning" model="ir.ui.view">
|
||||||
<field name="name">mrp.production.tree.inherit.planning</field>
|
<field name="name">mrp.production.tree.inherit.planning</field>
|
||||||
<field name="model">mrp.production</field>
|
<field name="model">mrp.production</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree default_order="date_planned_start asc" decoration-info="state=='confirmed'" decoration-danger="date_planned_start<current_date and state not in ('done','cancel')" decoration-muted="state in ('done','cancel')" string="Manufacturing Orders" name="Production">
|
<tree default_order="date_planned_start asc" decoration-info="state=='confirmed'"
|
||||||
<field name="message_needaction" invisible="1"/>
|
decoration-danger="date_planned_start<current_date and state not in ('done','cancel')"
|
||||||
<field name="name"/>
|
decoration-muted="state in ('done','cancel')" string="Manufacturing Orders" name="Production">
|
||||||
<field name="date_planned_start"/>
|
<field name="message_needaction" invisible="1"/>
|
||||||
<field name="product_id"/>
|
<field name="name"/>
|
||||||
<field name="product_qty" sum="Total Qty" string="Quantity"/>
|
<field name="date_planned_start"/>
|
||||||
<field name="product_uom_id" string="Unit of Measure" options="{'no_open':True,'no_create':True}" groups="uom.group_uom"/>
|
<field name="product_id"/>
|
||||||
<field name="reservation_state" string="Availability"/>
|
<field name="product_qty" sum="Total Qty" string="Quantity"/>
|
||||||
<field name="origin"/>
|
<field name="product_uom_id" string="Unit of Measure" options="{'no_open':True,'no_create':True}"
|
||||||
<field name="state"/>
|
groups="uom.group_uom"/>
|
||||||
</tree>
|
<field name="reservation_state" string="Availability"/>
|
||||||
</field>
|
<field name="origin"/>
|
||||||
</record>
|
<field name="state"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<!-- <record id="mrp_production_form_inherit_planning" model="ir.ui.view">-->
|
<!-- <record id="mrp_production_form_inherit_planning" model="ir.ui.view">-->
|
||||||
<!-- <field name="name">mrp.production.form_inherit_planning</field>-->
|
<!-- <field name="name">mrp.production.form_inherit_planning</field>-->
|
||||||
<!-- <field name="model">mrp.production</field>-->
|
<!-- <field name="model">mrp.production</field>-->
|
||||||
<!-- <field name="inherit_id" ref="mrp.mrp_production_form_view"/>-->
|
<!-- <field name="inherit_id" ref="mrp.mrp_production_form_view"/>-->
|
||||||
<!-- <field name="arch" type="xml">-->
|
<!-- <field name="arch" type="xml">-->
|
||||||
<!-- <xpath expr="div[hasclass('oe_chatter')]" position="replace">-->
|
<!-- <xpath expr="div[hasclass('oe_chatter')]" position="replace">-->
|
||||||
<!-- <!– 这里放置替换后的内容 –>-->
|
<!-- <!– 这里放置替换后的内容 –>-->
|
||||||
<!-- </xpath>-->
|
<!-- </xpath>-->
|
||||||
<!-- <xpath expr="//notebook" position="after">-->
|
<!-- <xpath expr="//notebook" position="after">-->
|
||||||
<!-- <div class="oe_chatter">-->
|
<!-- <div class="oe_chatter">-->
|
||||||
<!-- <field name="message_follower_ids"/>-->
|
<!-- <field name="message_follower_ids"/>-->
|
||||||
<!-- <field name="activity_ids"/>-->
|
<!-- <field name="activity_ids"/>-->
|
||||||
<!-- <field name="message_ids"/>-->
|
<!-- <field name="message_ids"/>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- </xpath>-->
|
<!-- </xpath>-->
|
||||||
<!-- </field>-->
|
<!-- </field>-->
|
||||||
<!-- </record>-->
|
<!-- </record>-->
|
||||||
|
|
||||||
<record id="mrp_production_view_search_inherit_planning" model="ir.ui.view">
|
<record id="mrp_production_view_search_inherit_planning" model="ir.ui.view">
|
||||||
<field name="name">mrp.production.search.view.inherit.planning</field>
|
<field name="name">mrp.production.search.view.inherit.planning</field>
|
||||||
@@ -43,7 +46,9 @@
|
|||||||
<field name="inherit_id" ref="mrp.view_mrp_production_filter"/>
|
<field name="inherit_id" ref="mrp.view_mrp_production_filter"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<filter name="filter_planned" position="attributes">
|
<filter name="filter_planned" position="attributes">
|
||||||
<attribute name="domain">[('is_planned', '=', True), ('date_planned_start', '!=', False), ('date_planned_finished', '!=', False)]</attribute>
|
<attribute name="domain">[('is_planned', '=', True), ('date_planned_start', '!=', False),
|
||||||
|
('date_planned_finished', '!=', False)]
|
||||||
|
</attribute>
|
||||||
</filter>
|
</filter>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@@ -51,30 +56,33 @@
|
|||||||
<record id="production_order_unplan_server_action" model="ir.actions.server">
|
<record id="production_order_unplan_server_action" model="ir.actions.server">
|
||||||
<field name="name">Unplan orders</field>
|
<field name="name">Unplan orders</field>
|
||||||
<field name="model_id" ref="mrp.model_mrp_production"/>
|
<field name="model_id" ref="mrp.model_mrp_production"/>
|
||||||
<field name="binding_model_id" ref="mrp.model_mrp_production" />
|
<field name="binding_model_id" ref="mrp.model_mrp_production"/>
|
||||||
<field name="binding_view_types">list</field>
|
<field name="binding_view_types">list</field>
|
||||||
<field name="state">code</field>
|
<field name="state">code</field>
|
||||||
<field name="code">records.button_unplan()</field>
|
<field name="code">records.button_unplan()</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="mrp.act_product_mrp_production_workcenter" model="ir.actions.act_window">
|
<record id="mrp.act_product_mrp_production_workcenter" model="ir.actions.act_window">
|
||||||
<field name="domain">[('bom_id', '!=', False), ('bom_id.operation_ids.workcenter_id', '=', active_id), ('date_planned_start', '!=', False), ('date_planned_finished', '!=', False)]</field>
|
<field name="domain">[('bom_id', '!=', False), ('bom_id.operation_ids.workcenter_id', '=', active_id),
|
||||||
|
('date_planned_start', '!=', False), ('date_planned_finished', '!=', False)]
|
||||||
|
</field>
|
||||||
<field name="view_id" ref="mrp_production_tree_view_planning"/>
|
<field name="view_id" ref="mrp_production_tree_view_planning"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
<menuitem id="mrp_workorder_menu_planning"
|
<menuitem id="mrp_workorder_menu_planning"
|
||||||
name="Work Orders"
|
name="Work Orders"
|
||||||
sequence="2"
|
sequence="2"
|
||||||
parent="mrp.mrp_planning_menu_root"
|
parent="mrp.mrp_planning_menu_root"
|
||||||
groups="mrp.group_mrp_routings"/>
|
groups="mrp.group_mrp_routings"/>
|
||||||
<menuitem id="menu_mrp_workorder_production"
|
<menuitem id="menu_mrp_workorder_production"
|
||||||
name="Planning by Production"
|
name="Planning by Production"
|
||||||
sequence="1"
|
sequence="1"
|
||||||
action="mrp.action_mrp_workorder_production"
|
action="mrp.action_mrp_workorder_production"
|
||||||
parent="mrp_workorder_menu_planning"/>
|
parent="mrp_workorder_menu_planning"/>
|
||||||
<menuitem id="menu_mrp_workorder_workcenter"
|
<menuitem id="menu_mrp_workorder_workcenter"
|
||||||
name="Planning by Workcenter"
|
name="Planning by Workcenter"
|
||||||
sequence="2"
|
sequence="2"
|
||||||
action="mrp_workorder.action_mrp_workorder_dependencies_workcenter"
|
action="mrp_workorder.action_mrp_workorder_dependencies_workcenter"
|
||||||
parent="mrp_workorder_menu_planning"/>
|
parent="mrp_workorder_menu_planning"/>
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
@@ -291,6 +291,7 @@
|
|||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">mrp.production</field>
|
<field name="res_model">mrp.production</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
|
<field name="domain">[('picking_type_id.active', '=', True)]</field>
|
||||||
</record>
|
</record>
|
||||||
<record model="ir.actions.act_window" id="sale_custom_action">
|
<record model="ir.actions.act_window" id="sale_custom_action">
|
||||||
<!-- 自定义额外的动作 -->
|
<!-- 自定义额外的动作 -->
|
||||||
|
|||||||
Reference in New Issue
Block a user