From 4706bfe85e2443a38ec514c9fa7343dab3574a1f Mon Sep 17 00:00:00 2001 From: guanhuan Date: Thu, 10 Jul 2025 17:36:37 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=AE=A1=E5=88=92=E9=87=8F=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E8=A2=AB=E4=BF=AE=E6=94=B9=E6=88=90=E4=BA=86=E5=88=AB?= =?UTF-8?q?=E7=9A=84=E5=AD=97=E6=AE=B5=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_demand_plan/static/src/scss/style.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sf_demand_plan/static/src/scss/style.css b/sf_demand_plan/static/src/scss/style.css index 08d382c1..8c2b61c9 100644 --- a/sf_demand_plan/static/src/scss/style.css +++ b/sf_demand_plan/static/src/scss/style.css @@ -83,7 +83,7 @@ } } -th[data-name=processing_time] + th::before{ - content: '待执行单据'; - line-height: 38px; -} +/*.demand_plan_tree th[data-name=planned_start_date] + th::before{*/ +/* content: '待执行单据';*/ +/* line-height: 38px;*/ +/*}*/ From 20980bed9de12b256b45bc211276161fff9931ba Mon Sep 17 00:00:00 2001 From: guanhuan Date: Mon, 14 Jul 2025 10:54:17 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=A2=E4=BE=9B?= =?UTF-8?q?=E6=96=99=E4=BA=A7=E5=93=81=E4=B8=8B=E8=BE=BE=E8=AE=A1=E5=88=92?= =?UTF-8?q?,=E7=AC=AC=E4=BA=8C=E4=B8=AA=E8=AE=A1=E5=88=92=E4=B8=8B?= =?UTF-8?q?=E8=BE=BE=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jikimo_purchase_request/models/stock_picking.py | 6 ++++-- sf_demand_plan/models/sf_demand_plan.py | 5 ++++- sf_manufacturing/models/stock.py | 9 ++++++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/jikimo_purchase_request/models/stock_picking.py b/jikimo_purchase_request/models/stock_picking.py index 037484c7..f0f3260a 100644 --- a/jikimo_purchase_request/models/stock_picking.py +++ b/jikimo_purchase_request/models/stock_picking.py @@ -41,8 +41,10 @@ class StockPicking(models.Model): if backorder_ids: purchase_request_lines = self.move_ids.move_orig_ids.purchase_line_id.purchase_request_lines if purchase_request_lines: - purchase_request_lines.move_dest_ids = [ - (4, x.id) for x in backorder_ids.move_ids if x.product_id.id in purchase_request_lines.mapped('product_id.id') + purchase_request_lines.move_dest_ids = [ + (4, x.id) for x in backorder_ids.move_ids if + x.product_id.id in purchase_request_lines.mapped('product_id.id') and \ + not x.created_purchase_request_line_id ] return res diff --git a/sf_demand_plan/models/sf_demand_plan.py b/sf_demand_plan/models/sf_demand_plan.py index 7707eec3..2decb63e 100644 --- a/sf_demand_plan/models/sf_demand_plan.py +++ b/sf_demand_plan/models/sf_demand_plan.py @@ -108,7 +108,10 @@ class SfDemandPlan(models.Model): def _compute_embryo_long(self): for line in self: if line.product_id: - line.embryo_long = f"{round(line.product_id.model_long, 3)}*{round(line.product_id.model_width, 3)}*{round(line.product_id.model_height, 3)}" + if line.product_id.blank_type == '圆料': + line.embryo_long = f"Ø{round(line.product_id.model_width, 3)}*{round(line.product_id.model_long, 3)}" + else: + line.embryo_long = f"{round(line.product_id.model_long, 3)}*{round(line.product_id.model_width, 3)}*{round(line.product_id.model_height, 3)}" else: line.embryo_long = None diff --git a/sf_manufacturing/models/stock.py b/sf_manufacturing/models/stock.py index ba6e9d20..072fe9f5 100644 --- a/sf_manufacturing/models/stock.py +++ b/sf_manufacturing/models/stock.py @@ -217,7 +217,8 @@ class StockRule(models.Model): ''' 创建制造订单时生成序列号 ''' - production.action_generate_serial() + if production.product_id.tracking != "none": + production.action_generate_serial() origin_production = production.move_dest_ids and production.move_dest_ids[ 0].raw_material_production_id or False orderpoint = production.orderpoint_id @@ -442,7 +443,7 @@ class ProductionLot(models.Model): @api.model def _get_next_serial(self, company, product): """Return the next serial number to be attributed to the product.""" - if product.tracking == "serial": + if product.tracking != "none": last_serial = self.env['stock.lot'].search( [('company_id', '=', company.id), ('product_id', '=', product.id), ('name', 'ilike', product.name)], limit=1, order='name desc') @@ -453,7 +454,9 @@ class ProductionLot(models.Model): return self.env['stock.lot'].generate_lot_names1(product.name, last_serial.name if ( not move_line_id or (last_serial and last_serial.name > move_line_id.lot_name)) else move_line_id.lot_name, 2)[1] - return "%s-%03d" % (product.name, 1) + else: + return "%s-%03d" % (product.name, 1) + return False qr_code_image = fields.Binary(string='二维码', compute='_generate_qr_code') From 88e4cfb541f359cc57dcec467d073a895029a7bf Mon Sep 17 00:00:00 2001 From: "lixiaobin@jikimo.com" Date: Mon, 14 Jul 2025 11:32:29 +0800 Subject: [PATCH 3/3] Debug-7269_lxb_commit --- sf_demand_plan/models/sf_production_demand_plan.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sf_demand_plan/models/sf_production_demand_plan.py b/sf_demand_plan/models/sf_production_demand_plan.py index 28c733c8..9a736ee5 100644 --- a/sf_demand_plan/models/sf_production_demand_plan.py +++ b/sf_demand_plan/models/sf_production_demand_plan.py @@ -344,9 +344,11 @@ class SfProductionDemandPlan(models.Model): pro_plan.do_production_schedule() def update_sale_order_state(self): - demand_plan = self.env['sf.demand.plan'].sudo().search([('sale_order_id', '=', self.sale_order_id.id)]) - demand_plan_state = demand_plan.filtered(lambda line: line.state != '40') - if not demand_plan_state: + # demand_plan = self.env['sf.demand.plan'].sudo().search([('sale_order_id', '=', self.sale_order_id.id)]) + # demand_plan_state = demand_plan.filtered(lambda line: line.state != '40') + production_demand_plan = self.env['sf.production.demand.plan'].sudo().search([('sale_order_id', '=', self.sale_order_id.id)]) + production_demand_plan_state = production_demand_plan.filtered(lambda line: line.status in ('10', '20', '30')) + if not production_demand_plan_state: # 修改销售订单为加工中 self.sale_order_id.state = 'processing' @@ -675,6 +677,7 @@ class SfProductionDemandPlan(models.Model): self._action_launch_stock_rule() if self.supply_method in ('automation', 'manual'): self.write({'status': '50'}) + self.update_sale_order_state() else: self.write({'status': '60'}) self.update_sale_order_state()