From acee32cc3901ca74f249f2d4a8df25a4ee00624d Mon Sep 17 00:00:00 2001
From: yuxianghui <3437689193@qq.com>
Date: Tue, 31 Dec 2024 08:47:44 +0800
Subject: [PATCH 1/2] =?UTF-8?q?1=E3=80=81=E9=87=87=E8=B4=AD=E8=AE=A2?=
=?UTF-8?q?=E5=8D=95form=E9=A1=B5=E4=B9=B0=E5=AE=B6=E6=94=B9=E5=90=8D?=
=?UTF-8?q?=E4=B8=BA=E9=87=87=E8=B4=AD=E5=91=98=EF=BC=9B2=E3=80=81?=
=?UTF-8?q?=E4=BC=98=E5=8C=96=E6=88=90=E5=93=81=E5=85=A5=E5=BA=93=E5=8D=95?=
=?UTF-8?q?=E7=9A=84=E7=9A=84=E5=9D=AF=E6=96=99=E5=A7=94=E5=A4=96=E5=8A=A0?=
=?UTF-8?q?=E5=B7=A5=E9=93=BE=E6=8E=A5=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sf_sale/views/purchase_order_view.xml | 3 +++
sf_stock/models/stock_picking.py | 10 +++++-----
sf_stock/views/stock_picking.xml | 2 +-
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/sf_sale/views/purchase_order_view.xml b/sf_sale/views/purchase_order_view.xml
index bab28456..dd2c452c 100644
--- a/sf_sale/views/purchase_order_view.xml
+++ b/sf_sale/views/purchase_order_view.xml
@@ -29,6 +29,9 @@
1
+
+ 采购员
+
diff --git a/sf_stock/models/stock_picking.py b/sf_stock/models/stock_picking.py
index 9b7b22b1..f8105097 100644
--- a/sf_stock/models/stock_picking.py
+++ b/sf_stock/models/stock_picking.py
@@ -47,23 +47,23 @@ class StockPicking(models.Model):
})
return action
- pro_out_purchase_count = fields.Integer('坯料外协单数量', compute='_compute_pro_out_purchase_count', store=True)
+ pro_out_purchase_count = fields.Integer('坯料委外单数量', compute='_compute_pro_out_purchase_count', store=True)
@api.depends('name')
def _compute_pro_out_purchase_count(self):
for sp in self:
if sp:
po_ids = self.env['purchase.order'].sudo().search([
- ('origin', 'like', sp.name), ('purchase_type', '=', 'consignment')])
+ ('origin', 'like', sp.name), ('purchase_type', '=', 'outsourcing')])
if po_ids:
sp.pro_out_purchase_count = len(po_ids)
def pro_out_purchase_order(self):
"""
- 坯料外协
+ 坯料委外
"""
po_ids = self.env['purchase.order'].sudo().search([
- ('origin', 'like', self.name), ('purchase_type', '=', 'consignment')])
+ ('origin', 'like', self.name), ('purchase_type', '=', 'outsourcing')])
action = {
'res_model': 'purchase.order',
'type': 'ir.actions.act_window',
@@ -75,7 +75,7 @@ class StockPicking(models.Model):
})
else:
action.update({
- 'name': _("外协订单列表"),
+ 'name': _("委外订单列表"),
'domain': [('id', 'in', po_ids.ids)],
'view_mode': 'tree,form',
})
diff --git a/sf_stock/views/stock_picking.xml b/sf_stock/views/stock_picking.xml
index 1ecc0d40..043a4d87 100644
--- a/sf_stock/views/stock_picking.xml
+++ b/sf_stock/views/stock_picking.xml
@@ -18,7 +18,7 @@
attrs="{'invisible': [('pro_out_purchase_count', '=', 0)]}">
- 坯料外协
+ 坯料委外
From 32e3c2f79fe6df18f926ad5323f6447e4af22cd0 Mon Sep 17 00:00:00 2001
From: yuxianghui <3437689193@qq.com>
Date: Tue, 31 Dec 2024 08:56:41 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E9=87=87=E8=B4=AD=E8=AE=A2=E5=8D=95?=
=?UTF-8?q?=E6=BA=90=E6=96=87=E6=A1=A3=E5=AD=97=E6=AE=B5=E5=90=8D=E7=A7=B0?=
=?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=BA=90=E5=8D=95=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sf_sale/views/purchase_order_view.xml | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/sf_sale/views/purchase_order_view.xml b/sf_sale/views/purchase_order_view.xml
index dd2c452c..eec616f4 100644
--- a/sf_sale/views/purchase_order_view.xml
+++ b/sf_sale/views/purchase_order_view.xml
@@ -32,7 +32,9 @@
采购员
-
+
+ 源单据
+
@@ -227,6 +229,9 @@
采购员
+
+ 源单据
+
hide
@@ -284,6 +289,9 @@
采购员
+
+ 源单据
+