Accept Merge Request #2249: (feature/齐套检查与下达生产 -> develop)

Merge Request: 坯料尺寸显示修改

Created By: @管欢
Reviewed By: @胡尧
Approved By: @胡尧 
Accepted By: @管欢
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/2249
This commit is contained in:
管欢
2025-06-24 11:44:41 +08:00
committed by Coding
2 changed files with 6 additions and 3 deletions

View File

@@ -196,11 +196,14 @@ class SfProductionDemandPlan(models.Model):
else:
line.model_long = None
@api.depends('product_id.model_long', 'product_id.model_width', 'product_id.model_height')
@api.depends('product_id.model_long', 'product_id.model_width', 'product_id.model_height', 'product_id.blank_type')
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

View File

@@ -28,7 +28,7 @@
<field name="qty_delivered"/>
<field name="qty_to_deliver"/>
<field name="model_long"/>
<field name="blank_type"/>
<field name="blank_type" optional="hide"/>
<field name="embryo_long"/>
<field name="materials_id"/>
<field name="model_machining_precision"/>