From 3ed338ed64485dfacea8fc7493cf6d1f62255204 Mon Sep 17 00:00:00 2001 From: hujiaying Date: Tue, 10 Sep 2024 14:50:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=A1=E5=88=92-=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8=E5=8F=AA=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=88=B6=E9=80=A0=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mrp_workorder/models/mrp_production.py | 7 -- mrp_workorder/views/mrp_production_views.xml | 108 ++++++++++--------- sf_plan/views/view.xml | 1 + 3 files changed, 59 insertions(+), 57 deletions(-) diff --git a/mrp_workorder/models/mrp_production.py b/mrp_workorder/models/mrp_production.py index b59bc990..91510baf 100644 --- a/mrp_workorder/models/mrp_production.py +++ b/mrp_workorder/models/mrp_production.py @@ -22,10 +22,3 @@ class MrpProduction(models.Model): wo.current_quality_check_id._update_component_quantity() 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 diff --git a/mrp_workorder/views/mrp_production_views.xml b/mrp_workorder/views/mrp_production_views.xml index a033d501..66f92243 100644 --- a/mrp_workorder/views/mrp_production_views.xml +++ b/mrp_workorder/views/mrp_production_views.xml @@ -1,41 +1,44 @@ - - - mrp.production.tree.inherit.planning - mrp.production - - - - - - - - - - - - - - + + + mrp.production.tree.inherit.planning + mrp.production + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + mrp.production.search.view.inherit.planning @@ -43,7 +46,9 @@ - [('is_planned', '=', True), ('date_planned_start', '!=', False), ('date_planned_finished', '!=', False)] + [('is_planned', '=', True), ('date_planned_start', '!=', False), + ('date_planned_finished', '!=', False)] + @@ -51,30 +56,33 @@ Unplan orders - + list code records.button_unplan() - [('bom_id', '!=', False), ('bom_id.operation_ids.workcenter_id', '=', active_id), ('date_planned_start', '!=', False), ('date_planned_finished', '!=', False)] + [('bom_id', '!=', False), ('bom_id.operation_ids.workcenter_id', '=', active_id), + ('date_planned_start', '!=', False), ('date_planned_finished', '!=', False)] + + + name="Work Orders" + sequence="2" + parent="mrp.mrp_planning_menu_root" + groups="mrp.group_mrp_routings"/> + name="Planning by Production" + sequence="1" + action="mrp.action_mrp_workorder_production" + parent="mrp_workorder_menu_planning"/> + name="Planning by Workcenter" + sequence="2" + action="mrp_workorder.action_mrp_workorder_dependencies_workcenter" + parent="mrp_workorder_menu_planning"/> diff --git a/sf_plan/views/view.xml b/sf_plan/views/view.xml index d0d3c84e..10992f4a 100644 --- a/sf_plan/views/view.xml +++ b/sf_plan/views/view.xml @@ -291,6 +291,7 @@ ir.actions.act_window mrp.production tree,form + [('picking_type_id.active', '=', True)]