From bfc071debd95e1b3eaac78484bf470256e5d076e Mon Sep 17 00:00:00 2001 From: guanhuan Date: Tue, 15 Jul 2025 10:34:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9C=80=E6=B1=82=E4=BD=8D=E7=BD=AE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_demand_plan/models/sf_production_demand_plan.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sf_demand_plan/models/sf_production_demand_plan.py b/sf_demand_plan/models/sf_production_demand_plan.py index ca957bfb..651f7884 100644 --- a/sf_demand_plan/models/sf_production_demand_plan.py +++ b/sf_demand_plan/models/sf_production_demand_plan.py @@ -14,8 +14,8 @@ class SfProductionDemandPlan(models.Model): _description = 'sf_production_demand_plan' def get_location_id(self): - stock_location = self.env['stock.location'].sudo().search([('name', '=', '客户')], limit=1) - return stock_location.id + customer_location_id = self.env['ir.model.data']._xmlid_to_res_id('stock.stock_location_customers') + return customer_location_id priority = fields.Selection(related='demand_plan_id.priority', string='优先级') status = fields.Selection([