Addresses - struggling to add our company

Hi everyone
I am falling at the first hurdle whilst setting up Axelor.
When I come to add our Partner and Company, I can’t add the company address. We are in the UK, in London, and Axelor doesn’t seem to accept London, our post code (UK zip code), or street name/number. It just says there is an error with those items and refuses to save.

I initially tried it without the demo data but then realised it has no countries/regions/cities installed at all then, so I went back and added the demo data. But it doesn’t seem to include the UK, maybe?

Anyway. I somehow need to make Axelor accept UK addresses. Can someone point me in the right direction here?

Many thanks
:fox_face:

Hi Fox,
You’ve to create the city (using the +sign in the city field). Beware not to forget to set the correct country on the city form otherwise, you won’t be able to select it.
Hope that helps.

Thanks for the quick response!

I have actually tried that, but although it says it has saved it, it then isn’t an option in the dropdown box. I’ve even done it a number of times now and checked things like setting the country (thanks for that tip!).

When I think I have created it, I then go and put the post code in on the address page, and it blanks the city field. Then I type ‹ London › into that field and it says that it doesn’t exist. So I create it, repeat. Same thing.

Axelor also won’t accept our post codes. I can sort of cheat by just typing directly into the Zip/City field and although it accepts that - or at least doesn’t check it - I have a feeling that this might cause issues later on so would like to just get it working as it should.

I also don’t really want to have to create every new city whenever I create an address in Axelor that is from a different place. I had thought that there would be a list of common cities already in the database - is this something I can add?

Thanks :slight_smile:
:fox_face:

You must have missed something (except if it’s broken in latest release). I’ve manually entered UK cities on my own instance so I can confirm that it works. Usual traps include: forgot to input country when creating city, typo in zipcode wrt parent form/child form. If you’ve to manually enter the post code on parent page, it means you didn’t entered it where you should have on the creation form otherwise it would be set automatically when selecting the city.
You can list created cities on the left menu; in App config » Referential » Configuration » Cities, to check that everything is OK (you can post a screen capture if you want)
For the cities import, it is feasible, you have to use Application Config » Technical Maintenance » Imports and start from https://github.com/axelor/axelor-open-suite/blob/master/axelor-base/src/main/resources/demo/. The file en/base_city.csv is ready to import, you just have to reduce the xml to remove everything except https://github.com/axelor/axelor-open-suite/blob/master/axelor-base/src/main/resources/demo/base-config.xml#L69 (updating the alpha code to bind to UK), put that in a zip file and upload it

Thanks for testing that for me. I must have made an error than so I will go back and have another look. I currently have the demo data in but I will try a clean install shortly and add only that data.

With regards zip codes - I’m not clear on how you set a zip code based on a city. London for example has 120 or so postcode areas, and 11,000 individual codes. Somewhere like Newcastle has consistency in the first two letters - NE - but after that they’re all different.

So what should be put in the zip code box when adding a city? Or should I put all of them, separated?

Ok so armed with that new info, I have discovered that the reason I couldn’t see the new city that I had just created in the dropdown was because I had already entered something in the zipcode box (and it wasn’t something that was saved in the city).

So it just comes back to the question in my last post then - how do I add more than one zipcode to a city?

Many thanks

Further to that question about adding more than one postcode per city then, I see that base_city.csv only contains French cities anyway? What do people usually do when using Axelor outside France - are there any resources available for UK cities (and elsewhere)?

Thanks!

Hi,
Indeed I didn’t check the base_city.csv in the en/ folder but these are french cities :slight_smile:
You’ll have to find and format the same kind of listing for UK cities. Currently, to my knowledge, one city is bound to one zipcode so you’ll have to create the city as many times as it has zipcodes.
Kind regards

Wow. That’s going to be a lot of cities!
Doesn’t Paris have twenty or so zipcodes though? It’s not a UK problem this.

Ah. That was quickly checked by a look at how Paris is dealt with in the base_city.csv.

Lots of duplicates
“30088”;“75101”;“PARIS”;“17100”;;“75”;“11”;“PARIS”;“PARIS 01”;“75001”;
“30089”;“75102”;“PARIS”;“22390”;;“75”;“11”;“PARIS”;“PARIS 02”;“75002”;
“30090”;“75103”;“PARIS”;“35991”;;“75”;“11”;“PARIS”;“PARIS 03”;“75003”;
“30091”;“75104”;“PARIS”;“27769”;;“75”;“11”;“PARIS”;“PARIS 04”;“75004”;
“30092”;“75105”;“PARIS”;“60179”;;“75”;“11”;“PARIS”;“PARIS 05”;“75005”;
“30093”;“75106”;“PARIS”;“43224”;;“75”;“11”;“PARIS”;“PARIS 06”;“75006”;
“30094”;“75107”;“PARIS”;“57092”;;“75”;“11”;“PARIS”;“PARIS 07”;“75007”;
“30095”;“75108”;“PARIS”;“38749”;;“75”;“11”;“PARIS”;“PARIS 08”;“75008”;
“30096”;“75109”;“PARIS”;“59474”;;“75”;“11”;“PARIS”;“PARIS 09”;“75009”;
“30097”;“75110”;“PARIS”;“94474”;;“75”;“11”;“PARIS”;“PARIS 10”;“75010”;
“30098”;“75111”;“PARIS”;“155006”;;“75”;“11”;“PARIS”;“PARIS 11”;“75011”;
“30099”;“75112”;“PARIS”;“144925”;;“75”;“11”;“PARIS”;“PARIS 12”;“75012”;
“30100”;“75113”;“PARIS”;“182386”;;“75”;“11”;“PARIS”;“PARIS 13”;“75013”;
“30101”;“75114”;“PARIS”;“141102”;;“75”;“11”;“PARIS”;“PARIS 14”;“75014”;
“30102”;“75115”;“PARIS”;“238190”;;“75”;“11”;“PARIS”;“PARIS 15”;“75015”;
“30103”;“75116”;“PARIS”;“167613”;;“75”;“11”;“PARIS”;“PARIS 16”;“75016”;
“30104”;“75117”;“PARIS”;“170156”;;“75”;“11”;“PARIS”;“PARIS 17”;“75017”;
“30105”;“75118”;“PARIS”;“201374”;;“75”;“11”;“PARIS”;“PARIS 18”;“75018”;
“30106”;“75119”;“PARIS”;“186116”;;“75”;“11”;“PARIS”;“PARIS 19”;“75019”;
“30107”;“75120”;“PARIS”;“197311”;;“75”;“11”;“PARIS”;“PARIS 20”;“75020”;

Still. This is going to be mad if I add London. That’s 11,000 duplicate Londons! And that’s just one UK city.

Surely this isn’t what everyone is doing… is it?! Would be better if you could just input the prefix. So in Paris’ case it would be Paris, 75*. In most UK cities you could then do Swansea, SA* and then for something like London just have an entry for N, NW, S, SE etc.

Ew… was about to answer with https://gist.github.com/beuss/beaa3f25cfd9a6638ac8a29a2c4d2991 (note that each zipcode is a district an addresses are usually labelled as « PARIS XX » where XX is the district number so these aren’t real duplicates :slight_smile:
I have to admit that I never understood UK cities postcodes :slight_smile:
Maybe you’d better only create cities with the prefix and manually modify the zip + City field on individual addresses? Obviously city entity is adapted primarily for french market, I don’t know how foreign users use it (not that I’m not axelor staff member).

Well it’s not really a million miles off how it works in London - we would probably have
“London N”
“London W”
etc to show the various areas.

Then we could do as you say - set the approx area, say W, SE, then modify in the zip + city field.

Then other places, “Yorkshire YO” or “Durham DH”.

Messy though. I would much rather it just work! We will have to decide it this is going to stop us using it or not.

I hope that Axelor come up with another more international-friendly way to do addresses soon (I have seen this discussed by them in other forum posts).

Thanks for your help.

Cool thing is: you can patch it \o/
It’s just a matter of adding a “zipcode suffix” to the address entity/form and modify the zipcode + city generation to include the suffix if I understand correctly how it works (you’d still have one entry per prefix for London though)

Yeah.

Although I think it would be preferable if Axelor could at least be set to ignore characters in the zipcode field after the first one, or two or something. As it is it just rejects it which is an odd behaviour for the average user.

So you could put London in the city box and W in the postcode box, for example, then modify the field below to add the rest of the postcode. But it would be better if you could write W1C 1JH in the postcode box and Axelor choose the City as ‹ London W › and have done with it.

Otherwise to get that behaviour I would have to add every single postcode variant :frowning:

Hello,

You can also load the uk cities from geoname website :
https://download.geonames.org/export/zip/

The import can be run from the Cities grid in Application config menu.

Regards

Right!
Just gave that a go.

It has imported all of the cities - and much like I thought I was going to have to do myself, it’s created an entry for each postcode for example:

GB EC1P 1LT London England ENG Greater London E99999999 Islington London Boro E09000019 51.5246 -0.112 6
GB EC1P 1LY London England ENG Greater London E99999999 Islington London Boro E09000019 51.5246 -0.112 6

However. Now that the import is complete, and Axelor is showing all of these cities in the Cities list, I should be able to use those when making a new address, right?

When I make a new address, I put the postcode into the zipcode box, then I should be able to see ‘London’ in the city dropdown. But it doesn’t show there.

So what is going wrong here? I must be making an error.

Thanks

Further to this, I can see that it does work but only if I just include the first part of the postcode. However, that will give you a list of a few cities that match the partial code and you have no idea which one is the one that matches the rest. If I complete the postcode - with or without the space - it doesn’t match at all.

Feels like it might be a bug rather than an error on my part. Any thoughts?

Thanks

Ok. Something a bit odd going on now because the above now works as expected (although only with a space in it, reasonable enough). I am going to put that part down to human error as I can’t recreate the issue.

During that testing I found one other thing though which is still an issue at the moment unless I’m doing something stupid.

Where a post code can be partly matched more than once it seems to be a problem.

For example
W1W 7BE and NW1W 7BE

W1W 7BE refuses to look up - presumably because it matches that both as W and also as NW.