修复客供料产品下达计划,第二个计划下达报错

This commit is contained in:
guanhuan
2025-07-14 10:54:17 +08:00
parent 4706bfe85e
commit 20980bed9d
3 changed files with 14 additions and 6 deletions

View File

@@ -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