Add per-product flag to skip Date and Next Control
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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),
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user