投料齐套检查修改

This commit is contained in:
guanhuan
2025-06-16 17:42:05 +08:00
parent dbe8c95558
commit 95b5c86242
2 changed files with 7 additions and 8 deletions

View File

@@ -30,8 +30,10 @@ class SfDemandPlanPrintWizard(models.TransientModel):
workorder_id = fields.Many2one('mrp.workorder', string='工单')
cnc_worksheet = fields.Binary('程序单')
def demand_plan_print(self):
for record in self:
def demand_plan_print(self, print_ids):
plan_print_ids = self.env['sf.demand.plan.print.wizard'].sudo().search(
[('id', 'in', print_ids)])
for record in plan_print_ids:
pdf_data = record.machining_drawings if record.type == '1' else record.cnc_worksheet
if pdf_data:
try: