Add per-product flag to skip Date and Next Control

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-14 12:06:12 +03:30
parent 6bbb8568c6
commit f9c6f3bc14
14 changed files with 145 additions and 27 deletions

View File

@@ -39,11 +39,13 @@ def print_page(request, order_id):
pages = build_print_pages(order)
cal = load_calibration()
show_dates = order.product.requires_dates
return render(request, 'slips/print_page.html', {
'order': order,
'pages': pages,
'date_formatted': order.production_date.strftime('%d/%m/%Y'),
'next_control_formatted': order.next_control_date.strftime('%d/%m/%Y'),
'show_dates': show_dates,
'date_formatted': order.production_date.strftime('%d/%m/%Y') if order.production_date else '',
'next_control_formatted': order.next_control_date.strftime('%d/%m/%Y') if order.next_control_date else '',
'calibration_css': css_vars(cal),
})