Skip to content

Commit

Permalink
docs: add network printer settings example (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
HKuz authored Aug 8, 2024
1 parent d86eb86 commit b2a0e9b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
Binary file added beam/docs/assets/select_printer_dialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions beam/docs/print_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@ There are several steps to get a print server connected in ERPNext.
3. The user must also create a new `Network Printer Settings` document and fill in the relevant information.

![Screen shot of the Network Printer Settings document fields, including Name, Printer Name, Server IP, and Port.](./assets/network_printer_settings.png)

A convenient Print Handling Unit button on relevant doctypes enables the user to print new Handling Unit labels directly from the ERPNext user interface.

![Screen shot showing the Print Handling Unit button at the top of a form.](./assets/print_hu.png)

Any configured network printers will display as options in the Select Printer Setting dialog.

![Screen shot of the Select Printer Setting dialog with two example printer options displaying as options.](./assets/select_printer_dialog.png)
16 changes: 16 additions & 0 deletions beam/tests/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def create_test_data():
create_material_request(settings)
create_production_plan(settings, prod_plan_from_doc)
create_purchase_receipt_for_received_qty_test(settings)
create_network_printer_settings(settings)


def create_suppliers(settings):
Expand Down Expand Up @@ -570,3 +571,18 @@ def create_purchase_receipt_for_received_qty_test(settings):
},
)
pr.save()


def create_network_printer_settings(settings):
printer_settings = [
{"name": "Receiving Printer", "server_ip": "localhost", "port": 8888},
{"name": "Kitchen Printer", "server_ip": "localhost", "port": 9999},
]
for ps in printer_settings:
if not frappe.db.exists("Network Printer Settings", ps):
nps = frappe.new_doc("Network Printer Settings")
nps.name = ps["name"]
nps.server_ip = ps["server_ip"]
nps.port = ps["port"]
nps.printer_name = ps["name"]
nps.save()

0 comments on commit b2a0e9b

Please sign in to comment.