Box Labels and Label Printing

Anyone use ERPNEXT in a manufacturing environment? We need to print labels with barcodes for moving sub assembly parts from one production cell to another.

Just wanting to hear anyone’s story on how they accomplish similar tasks.

1 Like

@sambrown777 Where you able to figure this out? I am currently working on solving a similar problem.

It seems that what you want to do is create a production order or warehouse transfer with a unique barcode identifying this “movement”. Or do you only want to print the barcode for all the items in the BOM with its quantity, etc.?

What ERPNext has:

  1. The barcode field per item already carries the data to be encoded in the barcode.

We basically want:

  1. ERPNext having the ability to generate different barcodes according to the different standards, ranging from EAN/UPC all the way to QR Code.
  2. For each DocType, the option to print a “transfer” label from cell to cell (or unit to unit)
  3. For each item, the option to print a barcode, whilst formatting it (i.e. adding any field possible, such as product name, weight, a set date, description and any field imaginable belonging to the Item DocType)

Do you agree?

you could accomplishe to print a lable by amending the POS receipt print format ant custom HTML / JINJA to fetch the desired fields then hand them to an external barcode API

We are working on the design of this solution and it should suit your requirements

1 Like

If your printer supports Zebra coding (ZPL), then it is very easy to print labels (most of the label printers do, but I can be wrong).
Requisites - You need to know the ip of the printer, and the ZPL Codes. If you know the zpl code of the label, then you can easily pass the variables to that code, and get the label printed. You can get the ZPL code of your label by - designing the label in ZPL software, and print the label to file. It will create a prn file, and you can use that in your programs. Or the other way, is to go through the ZPL manuals which is available in the internet for free download.

import socket #One easy way to find the IP address is with this nmap command # nmap 192.168.1.* -p T:9100 --open label_printer_ip = 'xxx.xxx.xx.xxx TCP_PORT = 9100 BUFFER_SIZE = 1024 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((label_printer_ip, TCP_PORT))
    zpl = "label code in ZPL format"    #All the ZPL codes go here, including barcodes
   s.send(bytes(zpl))
   s.close()
3 Likes

thanks we’ll have a look into it

Hi @kirthi,

Where should this code be written? In a python file?

Thanks
Uma

Yes, put this function in a python file (whitelist the function).
You can call it and pass the data wherever you need the label to be printed from.

(For eg - you can call this function from javascript on click of a button to print the label)

2 Likes

Hello thank you for the code , How I can add it to item? Like , an item was manufactured, and then it was assigned lets suppose 50 serial numbers , Now I want to print all those? Any thoughts how it can be achieved ? Like the serial number which have been used should not be printed again.