Hello everyone,
Good Day,
Please I need to generate barcode automatically when I add an item,
I use Erpnext V14.7
Please help
Thank you
Hello everyone,
Good Day,
Please I need to generate barcode automatically when I add an item,
I use Erpnext V14.7
Please help
Thank you
You can use Server Script for that. Does barcode should contain the Item Code?
No, I just need to generate the barcode automatically.
Please look at this video I found it, it’s awesome solution but I don’t know how can I make it
Best regards
@karim.badawy When u said to generate barcode automatically when I add an item
what do u mean by that. Is it during creation of new item? And also what ur barcode should represent, I mean the value, is it gona be random alphanumeric value?
Hello sir
Thanks for your time it could be something fixed like the naming series stracture to generate private barcode for the item the main issue is after using naming series for item with variants the name of the item becomes so long which makes it very hard to generate short print barcode ,but if we could choose a numerical incremented code with the type of the code as qr or 2d or code128… It will be much more flexible and automated although there is no short series control for long named items
The example expressed in the video shows type of control on barcode you may check it but the creator didn’t respond
To have same structure as naming series, u might want to use from frappe.model.naming import make_autoname
to create auto incremental.
U can create custom button in Item
doctype and call the method and store it in barcodes
table or u can create the a validate hook
that auto create and assign the value to barcodes
table if the table in empty
I had done this before , but I implemented the mechanism in doctype python script by performing modifiaction in before_rename / before_insert / on_update method of the python file.
I remembered using modified python barcode library to be compatible with how erpnext system render it’s barcode
Unfortunately , my solution requires python programming skill a bit.