修复需求计划生成的bom编码时间少8小时
This commit is contained in:
@@ -197,7 +197,7 @@ class SfDemandPlan(models.Model):
|
||||
def name_get(self):
|
||||
result = []
|
||||
for plan in self:
|
||||
result.append((plan.id, plan.sale_order_id.name))
|
||||
result.append((plan.id, plan.product_id.name))
|
||||
return result
|
||||
|
||||
def button_production_release_plan(self):
|
||||
|
||||
@@ -686,9 +686,9 @@ class SfProductionDemandPlan(models.Model):
|
||||
|
||||
# 复制成品模板上的属性
|
||||
self.product_id.product_tmpl_id.copy_template(product_template_id)
|
||||
|
||||
future_time = datetime.now() + timedelta(hours=8)
|
||||
# 生成BOM单据编码
|
||||
code = f"{self.product_id.default_code}-{bom_type}-{datetime.now().strftime('%Y%m%d%H%M%S')}"
|
||||
code = f"{self.product_id.default_code}-{bom_type}-{future_time.strftime('%Y%m%d%H%M%S')}"
|
||||
|
||||
order_id = self.sale_order_id
|
||||
product = self.product_id
|
||||
|
||||
Reference in New Issue
Block a user