Similar Warehouses

I’ve got my Main Warehouses broken into physical address/location. Then those are broken down by room, then cabinet/shelf/etc. The problem is, I can’t seem to create similar warehouses in different locations.

For example, I have in Warehouse1, Room 1, I have BIN A, with locations 1-150. I also need Warehouse 1, Room 1, BIN B, locations 1-150.

Even though I set BIN B’s parent to Room 1, when I try to create sub-locations 1-150 in BIN B it errors out telling me I already have a “1” location.

Is there a way to resolve this without having to rename all of my currently labeled shelfs?

So I just realized I can change the Naming Series for Warehouse, but I think what I need to do is have the name include the parent warehouse shortcode, in order to make unique sub-warehouses.

The odd thing, is, I can create three levels down unique entries, but not four, for example
Warehouse 1 - Room 1 - BIN A and I can also create
Warehouse 1 - Room 1 - BIN B

But I cannot create
Warehouse 1 - Room 1 - BIN A - Location 100
Warehouse 1 - Room 1 - BIN B - Location 100 ← This one throws an error that Location 100 already exists

But I CAN create
Warehouse 2 - Room 1 - BIN A

but cannot create
Warehouse 2 - Room 1 - BIN A - Location 100 ← This one throws an error that Location 100 already exists.

This is likely because you have some existing warehouse elsewhere in the db with this name. Are you creating this naming programmatically or manually?
I would export your warehouse via the data import tool and edit them manually. Some light excel programming could solve this very quickly.

They’re being created automatically. I guess that could be my question. It looks like it’s auto-naming the warehouses with Warehousename - Company Shortcode… So therefore, if I try to create a location 100, in Company ABC, it’s code becomes - 100 - ABC. So, if I try to create another 100, even in a different warehouse, it tries to generate 100 - ABC again.

What I’d like it to do, I think, is always include shortcodes to all of the parent warehouses before adding the name. For Example:
Warehouse 1 = WH1
Warehouse 2 = WH2
Room 1 = RM1
Room 2 = RM2
Location 100 = 100
Location 200 = 200

And so variants would look like…


Make sense?
I will try to go back and edit existing warehouse names, but I’d like to not have to change them all manually as I add them / create them.

I guess the real question is. Let’s say I add a field to all warehouses, called “shortcode”.
If I want each new warehouse to build off of any previous parent shortcodes, can I do that programmatically?

So, as I described above, but maybe more technically.
I add the required field “shortcode” to the warehouse form.
And the name of any new warehouse should iterate through all warehouses “above” it (parents) to name itself.

Example just like above.
Company XYZ Co has name already / shortcode already XYZ (by default this action already happens)
Parent Group: Main Building has shortcode WH1, therefore is called XYZ-WH1 (parent is the company)
Child Group: Room 1 has shortcode of RM1, therefore is called XYZ-WH1-RM1
Child Warehouse: BIN A has shortcode BIN_A, therefore is called XYZ-WH1-RM1-BIN_A

I would think this could be done quite easily but I’m not that familiar with ERPNext yet.

Hi @stardotmatt, yes you can. There’s more than one way to solve this and it depends on how much you want to break/customize ERPNext in the process. If you are not yourself a programmer, one can be found here to tackle this problem; it’s a nice bite size.

So, without breaking too much, here’s what I’ve got so far.

I added the Shortcode field and I manually add the correct shortcode to each new warehouse.

Right now, if I change the display name, it changes the back-end “ID” to the same thing. I think because of the Naming Series. So, I still cannot have two different "BIN A"s. How can I set the back-end ID to the shortcode and the display name to something that doesn’t have to be unique?

Do I just have to cancel the Naming Sequence for it and set the name to not unique?

I would approach this by changing the autonaming function (python/ server side). The autoname function is set to append the company abbreviation to most/all asset/liability/equity accounts.
Here’s a code snippet with an alternative approach:

This will still not allow you to have non-unique names. Programmatically building them in (so that ll the parents are included in the name) is the way to go. Once you try to put an item into a warehouse and you have 1000 bins and multiples named “BIN-0001” you’re in bad shape. This introduces a data entry problem on the other side and I don’t have an easy solution for that.
A treeview picker on a custom dialog would be awesome, discussed here: