From 43d9c5462648914c509df9210914048c6d63f7e1 Mon Sep 17 00:00:00 2001
From: mgw <1392924357@qq.com>
Date: Thu, 14 Sep 2023 09:17:38 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=E7=BB=93?=
=?UTF-8?q?=E6=9E=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sf_manufacturing/models/stock.py | 1 +
sf_plan/models/custom_plan.py | 4 ++--
sf_plan/views/view.xml | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/sf_manufacturing/models/stock.py b/sf_manufacturing/models/stock.py
index fd014941..5a4e2ec4 100644
--- a/sf_manufacturing/models/stock.py
+++ b/sf_manufacturing/models/stock.py
@@ -203,6 +203,7 @@ class StockRule(models.Model):
productions = self.env['sf.production.plan'].with_user(SUPERUSER_ID).sudo().with_company(company_id). \
create({
'name': production.name,
+ 'order_deadline': sale_order.deadline_of_delivery,
'production_id': production.id,
'date_planned_start': production.date_planned_start,
'origin': production.origin,
diff --git a/sf_plan/models/custom_plan.py b/sf_plan/models/custom_plan.py
index f2d2ac15..15af211a 100644
--- a/sf_plan/models/custom_plan.py
+++ b/sf_plan/models/custom_plan.py
@@ -20,7 +20,7 @@ class sf_production_plan(models.Model):
], string='工单状态', tracking=True)
name = fields.Char(string='工单编号')
# selected = fields.Boolean(default=False)
- order_number = fields.Char(string='订单号')
+ # order_number = fields.Char(string='订单号')
order_deadline = fields.Datetime(string='订单交期')
production_id = fields.Many2one('mrp.production', '关联制造订单')
product_qty = fields.Float(string='数量', digits='Product Unit of Measure', required=True, default=0.0)
@@ -32,7 +32,7 @@ class sf_production_plan(models.Model):
schedule_setting = fields.Selection([
('reverse', '倒排'), ('positive', '顺排')], string='排程设置', default='reverse')
product_id = fields.Many2one('product.product', '关联产品')
- origin = fields.Char(string='来源')
+ origin = fields.Char(string='订单号')
# 加工时长
process_time = fields.Float(string='加工时长', digits=(16, 2))
# 实际加工时长、实际开始时间、实际结束时间
diff --git a/sf_plan/views/view.xml b/sf_plan/views/view.xml
index 04751d0c..7878fa5f 100644
--- a/sf_plan/views/view.xml
+++ b/sf_plan/views/view.xml
@@ -11,7 +11,7 @@
-
+