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:
@@ -196,11 +196,14 @@ class SfProductionDemandPlan(models.Model):
|
|||||||
else:
|
else:
|
||||||
line.model_long = None
|
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):
|
def _compute_embryo_long(self):
|
||||||
for line in self:
|
for line in self:
|
||||||
if line.product_id:
|
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:
|
else:
|
||||||
line.embryo_long = None
|
line.embryo_long = None
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
<field name="qty_delivered"/>
|
<field name="qty_delivered"/>
|
||||||
<field name="qty_to_deliver"/>
|
<field name="qty_to_deliver"/>
|
||||||
<field name="model_long"/>
|
<field name="model_long"/>
|
||||||
<field name="blank_type"/>
|
<field name="blank_type" optional="hide"/>
|
||||||
<field name="embryo_long"/>
|
<field name="embryo_long"/>
|
||||||
<field name="materials_id"/>
|
<field name="materials_id"/>
|
||||||
<field name="model_machining_precision"/>
|
<field name="model_machining_precision"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user