Issue 5563

Scalability issues in party address subdivision
Nosy list
albertca, ced, meanmicio, pokoli, roundup-bot, yangoon
Assigned to

Created on 2016-05-20.12:43:01 by meanmicio, last changed 72 months ago by ced.


Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2016-06-14.18:27:54
Address goes from general to details, so if you want to have more details about subdivision, just add a new subdivision field.
Author: [hidden] (albertca)
Date: 2016-06-14.18:23:54
Sorry I didn't mention it earlier (I didn't see a review was created for this). 

In Spain we will always need to select a subdivision with a parent, so we will need one of those customization modules you mention that would need to be created.

Here we have "Provincias" inside "Comunidades Autónomas". Users need to introduce "Provincias", not "Comunidades Autónomas" so I guess we would need either to:

- Hide the subdivision field and add a subsubdivision field
- Or just remove the constraint from the field

I really don't see the reason for requiring such customization when using a m2o field would solve it for everyone, I think. We could even make "rec_name" to concatenate the name of parent subdivisions which I think would make information more clear when managing addresses of countries the user is not familiar with.

From my point of view the arguments for not using a m2o just because the user does not need to create new records is very weak. For me, that is a matter of permissions and the same widget (m2o) should always be used.

I know I'm late, so just my 2 cents.
New changeset ff9fd5376395 by C?dric Krier in branch 'default':
Restrict subdivision address to first level
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2016-05-23.10:51:04
Here is review22011002 that restrict to first level of subdivision.
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2016-05-22.08:35:57
But if we restrict to only first subdivision level, I don't think it exists countries with too much subdivision. I know from private communication, that the use case of Luis is due to additional subdivisions of a country which are not from the first level.
For me, selection widget is better here because there is no reason to allow to create subdivisions from the address form as we have all the countries loaded.
Author: [hidden] (albertca)
Date: 2016-05-22.00:42:44
For me, we could change default view in address form to use a m2o
widget instead of selection.
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2016-05-20.13:19:54
I quite doubt that such query could have performance issue as there is an index on the column country. Also the selection has a cache so it fetch only when new countries are selected.
But for sure, if there are a lot of subdivisions for one country, the size of the data starts to be large. In such case, it will be good to customize the view to remove the selection widget and just use plain Many2One.
Also I'm wondering if we should not only restrict the subdivision field to the one without parent as normally we only want the first level of subdivision in the address.
Author: [hidden] (meanmicio)
Date: 2016-05-20.12:43:00
The current design on party address does not scale, since anytime the party model is accessed, it selects all the subdivisions for that country[1]. The performance degradation is such that it makes the system unusable even with reasonably small number of subdivisions.

1.- SELECT "a"."id" AS "id" FROM "country_subdivision" AS "a" WHERE (("a"."country" = 22)) ORDER BY "a"."code" ASC, "a"."id" ASC
Date User Action Args
2016-06-14 18:27:54cedsetstatus: chatting -> resolved
messages: + msg26314
2016-06-14 18:23:55albertcasetstatus: resolved -> chatting
messages: + msg26313
2016-06-14 16:22:47roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg26289
2016-05-23 11:00:13reviewbotsetreviews: 22011002
keyword: + review
2016-05-23 10:51:04cedsetstatus: chatting -> testing
assignedto: ced
messages: + msg25930
2016-05-22 08:35:59cedsetmessages: + msg25923
2016-05-22 00:42:45albertcasetnosy: + albertca
messages: + msg25920
2016-05-20 13:19:55cedsetpriority: urgent -> feature
status: unread -> chatting
messages: + msg25909
nosy: + ced
2016-05-20 13:05:58yangoonsetnosy: + yangoon
2016-05-20 13:01:36pokolisetnosy: + pokoli

Showing 10 items. Show all history (warning: this could be VERY long)