物料需求计划增加字段显示

This commit is contained in:
guanhuan
2025-06-19 10:37:35 +08:00
parent 566bc0e1e2
commit b4ed65a75c
2 changed files with 3 additions and 3 deletions

View File

@@ -69,10 +69,10 @@ class SfProductionDemandPlan(models.Model):
"交货数量", related='sale_order_line_id.qty_delivered') "交货数量", related='sale_order_line_id.qty_delivered')
qty_to_deliver = fields.Float( qty_to_deliver = fields.Float(
"待交货数量", related='sale_order_line_id.qty_to_deliver') "待交货数量", related='sale_order_line_id.qty_to_deliver')
model_long = fields.Char('尺寸', compute='_compute_model_long') model_long = fields.Char('尺寸(mm)', compute='_compute_model_long')
blank_type = fields.Selection([('圆料', '圆料'), ('方料', '方料')], string='坯料分类', blank_type = fields.Selection([('圆料', '圆料'), ('方料', '方料')], string='坯料分类',
related='product_id.blank_type') related='product_id.blank_type')
embryo_long = fields.Char('坯料尺寸', compute='_compute_embryo_long') embryo_long = fields.Char('坯料尺寸(mm)', compute='_compute_embryo_long')
materials_id = fields.Char('材料', compute='_compute_materials_id', store=True) materials_id = fields.Char('材料', compute='_compute_materials_id', store=True)
model_machining_precision = fields.Selection(selection=_get_machining_precision, string='精度', model_machining_precision = fields.Selection(selection=_get_machining_precision, string='精度',
related='product_id.model_machining_precision') related='product_id.model_machining_precision')

View File

@@ -42,7 +42,7 @@ class SfDemandPlanPrintWizard(models.TransientModel):
if pdf_data: if pdf_data:
try: try:
# 执行打印 # 执行打印
# self.env['jikimo.printing'].sudo().print_pdf(pdf_data) self.env['jikimo.printing'].sudo().print_pdf(pdf_data)
record.status = 'success' record.status = 'success'
t_part, c_part = record.demand_plan_id.print_count.split('C') t_part, c_part = record.demand_plan_id.print_count.split('C')
t_num = int(t_part[1:]) t_num = int(t_part[1:])