Created on 2016-05-20.12:43:01 by meanmicio, last changed 72 months ago by ced.
Address goes from general to details, so if you want to have more details about subdivision, just add a new subdivision field.
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 http://hg.tryton.org/modules/party/rev/ff9fd5376395
Here is review22011002 that restrict to first level of subdivision.
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.
For me, we could change default view in address form to use a m2o widget instead of selection.
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.
The current design on party address does not scale, since anytime the party model is accessed, it selects all the subdivisions for that country. 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
|2016-06-14 18:27:54||ced||set||status: chatting -> resolved|
messages: + msg26314
|2016-06-14 18:23:55||albertca||set||status: resolved -> chatting|
messages: + msg26313
|2016-06-14 16:22:47||roundup-bot||set||status: testing -> resolved|
nosy: + roundup-bot
messages: + msg26289
|2016-05-23 11:00:13||reviewbot||set||reviews: 22011002|
keyword: + review
|2016-05-23 10:51:04||ced||set||status: chatting -> testing|
messages: + msg25930
|2016-05-22 08:35:59||ced||set||messages: + msg25923|
messages: + msg25920
|2016-05-20 13:19:55||ced||set||priority: urgent -> feature|
status: unread -> chatting
messages: + msg25909
nosy: + ced
|2016-05-20 13:05:58||yangoon||set||nosy: + yangoon|
|2016-05-20 13:01:36||pokoli||set||nosy: + pokoli|
Showing 10 items. Show all history (warning: this could be VERY long)