修改计划-生产订单列表只显示制造订单
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
|
|
||||||
|
|||||||
@@ -5,13 +5,16 @@
|
|||||||
<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'"
|
||||||
|
decoration-danger="date_planned_start<current_date and state not in ('done','cancel')"
|
||||||
|
decoration-muted="state in ('done','cancel')" string="Manufacturing Orders" name="Production">
|
||||||
<field name="message_needaction" invisible="1"/>
|
<field name="message_needaction" invisible="1"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="date_planned_start"/>
|
<field name="date_planned_start"/>
|
||||||
<field name="product_id"/>
|
<field name="product_id"/>
|
||||||
<field name="product_qty" sum="Total Qty" string="Quantity"/>
|
<field name="product_qty" sum="Total Qty" string="Quantity"/>
|
||||||
<field name="product_uom_id" string="Unit of Measure" options="{'no_open':True,'no_create':True}" groups="uom.group_uom"/>
|
<field name="product_uom_id" string="Unit of Measure" options="{'no_open':True,'no_create':True}"
|
||||||
|
groups="uom.group_uom"/>
|
||||||
<field name="reservation_state" string="Availability"/>
|
<field name="reservation_state" string="Availability"/>
|
||||||
<field name="origin"/>
|
<field name="origin"/>
|
||||||
<field name="state"/>
|
<field name="state"/>
|
||||||
@@ -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>
|
||||||
@@ -58,10 +63,13 @@
|
|||||||
</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"
|
||||||
|
|||||||
@@ -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