From 6b61df9d507d3c6915ca50d3119ee5286f5a749c Mon Sep 17 00:00:00 2001 From: guanhuan Date: Fri, 3 Jan 2025 15:04:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=BA=8F=E5=A4=96=E5=8D=8F=E5=8F=91?= =?UTF-8?q?=E6=96=99=E9=80=9A=E7=9F=A5=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_message/__manifest__.py | 3 +- .../models/sf_message_mrp_production.py | 5 ++- sf_message/views/stock_picking_view.xml | 37 +++++++++++++++++++ 3 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 sf_message/views/stock_picking_view.xml diff --git a/sf_message/__manifest__.py b/sf_message/__manifest__.py index 8c769d60..42f1ad13 100644 --- a/sf_message/__manifest__.py +++ b/sf_message/__manifest__.py @@ -12,7 +12,7 @@ 'category': 'sf', 'website': 'https://www.sf.jikimo.com', 'depends': ['sale', 'purchase', 'sf_plan', 'jikimo_message_notify', 'stock', 'sf_quality', 'mrp', - 'sf_manufacturing','product','quality'], + 'sf_manufacturing', 'product', 'quality'], 'data': [ 'data/bussiness_node.xml', 'data/cron_data.xml', @@ -20,6 +20,7 @@ 'security/ir.model.access.csv', 'views/mrp_workorder_views.xml', 'views/purchase_order_view.xml', + 'views/stock_picking_view.xml', ], 'test': [ ], diff --git a/sf_message/models/sf_message_mrp_production.py b/sf_message/models/sf_message_mrp_production.py index b0689b81..9fd21e9e 100644 --- a/sf_message/models/sf_message_mrp_production.py +++ b/sf_message/models/sf_message_mrp_production.py @@ -63,8 +63,9 @@ class SFMessageMrpProduction(models.Model): [('origin', 'in', mrp_production_names), ('state', '=', 'assigned')]) if stock_picking_num >= 1: url = self.env['ir.config_parameter'].sudo().get_param('web.base.url') - action_id = self.env.ref('stock.action_picking_tree_ready').id - url_with_id = f"{url}/web#view_type=list&action={action_id}" + action_id = self.env.ref('sf_message.action_picking_outsourced_tree_ready').id + menu_id = self.env.ref('stock.menu_stock_root').id + url_with_id = f"{url}/web#view_type=list&action={action_id}&menu_id={menu_id}" content = content.replace('{{name}}', mrp_production.product_id.name).replace('{{url}}', url_with_id).replace( '{{num}}', str(stock_picking_num)) diff --git a/sf_message/views/stock_picking_view.xml b/sf_message/views/stock_picking_view.xml new file mode 100644 index 00000000..9087aa18 --- /dev/null +++ b/sf_message/views/stock_picking_view.xml @@ -0,0 +1,37 @@ + + + + + stock.picking.search + stock.picking + + + + + + + + + + + + 待办 + stock.picking + ir.actions.act_window + tree,kanban,form,calendar + + {'search_default_outsourced': 1,'contact_display': 'partner_address', + 'search_default_available': 1} + + + +

+ 没有仓库调拨。 让我们创建一个! +

+

+ 移动允许您将产品从一个位置移动到另外一个位置。 +

+
+
+
\ No newline at end of file