Use Canadian's region codes instead of names
Description
Environment
Attachments
- 30 Oct 2023, 10:04 AM
Activity
Anna Fadeeva October 30, 2023 at 10:04 AM
Hi All !
We using Description for region code in Russia. It is numerical and not mandatory.
Nicolas Micoud September 28, 2023 at 2:51 PM
Hi,
Seems that Mexican states are also inconsistent, see https://en.wikipedia.org/wiki/ISO_3166-2:MX
Do we all agree idea is to add a C_Region.RegionCode, and then, write migration scripts to update data country per country ?
HideakiHagiwara July 14, 2023 at 7:25 AM
Hi,
Thank you for caring about Japan.
:-D
There is prefectures code in Japan.
I would like to sort regions by prefectures code.
Now, I sort Regions by Description column
C_Region.RegionCode that Deepak says sounds good.
Deepak Pansheriya July 13, 2023 at 5:20 PM
To make it clear and definative, we should add Region Code field and with column name C_Region.RegionCode. Name should be used as full name.
We may needs to create script so country wise it migrate code.
I don’t prefer Region.value as it read as search key.
Carlos Ruiz July 13, 2023 at 4:05 PM
Hi @Nicolas Micoud - I’m seeing now a problem here - not caused by this ticket, but we have a real mess in the C_Region table:
I think would be good to hear the opinion from @Heng Sin Low and @Deepak Pansheriya as core devs.
And also from people that could be affected by changes here: @Hideaki Hagiwara , @Murilo Habermann Torquato , @Anna Fadeeva
The thing is that we have an interesting mess in the C_Region table and maybe is better to solve this correctly, there is no standard defined and every contribution has made something different.
From what I see in the actual core table we have:
Argentina and Spain
name = description
Australia and Mexico
just name AS a code, empty description
Austria and Germany
just name, empty description
Brazil and United States
name as a code, description as name
Canada
name as the name in English, Description as the name in french
Colombia
name as name, description as a combination of Colombian code+name
Japan
name as name in Japanese, description as combined name in Japanese and English
Russia
name as name in Russian
So, summarizing, we have the column Name used differently depending on the country, the column Description sometimes empty and sometimes used differently depending on the country, and because we don’t have a Region Code there is no place to fill that and every contributor is filling it somewhere.
Also, this is not easy, as sometimes there is no translation, but about Japan and Russia at least, I tend to think that the name must be in English and the translation managed in C_Region_Trl table. I say is not easy because the same treatment must be for all other languages, but there is a big deal with Russian and Japanese because of the different alphabet that cannot be read if printed in a label combined with an address in English.
So, what do you think?
I would think instead of applying the suggested patch from @Nicolas Micoud - we better define a standard to use and fix the data.
And also I think is better to create the field C_Region.Value or C_Region.RegionCode as optional to be filled at least with the standard of each country, or maybe add both, because for example in the case of Colombia the ISO code is barely used, but there is an internal code from the taxing authority that is widely used.
The decision is not easy because it will break things, not being backward compatible, so, we would need to announce it properly.
WDYT?
https://mattermost.idempiere.org/idempiere/pl/6jfb7psa6tfz9ct4n655izbfey