mirror of
https://github.com/rickbarrette/redmine_qbo_labels.git
synced 2026-11-17 17:50:36 -05:00
Print label in the top-right actions of issues, estimates and invoices prints the customer's last name and the PO number (W/E/I + number) in big bold letters on a 62mm continuous roll, with a preview of the label and its status until it's printed. A print agent on the printer's network (redmine_qbo_label_agent) asks Redmine for labels every couple of seconds with its printer's token, so labels print from anywhere. Administration » Label printers: printers, agent tokens and status, recent labels. Settings: label lengths, capitals, poll interval, how long a label waits for an offline agent, and logging the agents' requests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
1.2 KiB
Ruby
30 lines
1.2 KiB
Ruby
Redmine::Plugin.register :redmine_qbo_labels do
|
|
|
|
# About
|
|
name 'Redmine QBO Labels plugin'
|
|
author 'Rick Barrette'
|
|
description 'Prints part labels (customer last name and document number) for issues, estimates and invoices on a Brother QL label printer, through a small print agent on the printer\'s network'
|
|
version '2026.11.0'
|
|
url 'https://github.com/rickbarrette/redmine_qbo_labels'
|
|
author_url 'https://barrettefabrication.com'
|
|
requires_redmine version_or_higher: '7.0.0'
|
|
|
|
# Customers, estimates and invoices live in redmine_qbo
|
|
begin
|
|
requires_redmine_plugin :redmine_qbo, version_or_higher: '2026.11.0'
|
|
rescue Redmine::PluginNotFound
|
|
raise 'Please install the redmine_qbo plugin (https://github.com/rickbarrette/redmine_qbo)'
|
|
end
|
|
|
|
settings default: RedmineQboLabels::Settings::DEFAULTS.dup, partial: 'settings/qbo_labels'
|
|
|
|
# Print label dialog, sending the label and following its print job
|
|
permission :print_labels, { label_jobs: [:new, :create, :show] }, global: true
|
|
|
|
# Label printers (print agents) and their recent jobs
|
|
menu :admin_menu, :label_printers, { controller: 'label_printers', action: 'index' },
|
|
caption: :label_label_printer_plural, html: { class: 'icon icon-document' }
|
|
end
|
|
|
|
RedmineQboLabels.setup
|