Tryton - Issues

 

Issue7554

Title Allow to customize the type of subdivision used per country
Priority feature Status testing
Superseder Add MultiSelection field
View: 7851
Nosy List albertca, ced, pokoli, reviewbot
Type feature request Components party
Assigned To pokoli Keywords review
Reviews 49501002
View: 49501002

Created on 2018-07-02.13:20:11 by pokoli, last changed by ced.

Messages
msg46744 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-02-05.18:59:33
For me, this patch should not use Array field because msg46139. It should be based on a MultiSelection.
review49501002 updated at https://codereview.tryton.org/49501002/#ps140001
review49501002 updated at https://codereview.tryton.org/49501002/#ps120001
msg45409 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-12-20.14:36:40
Sorry but I did express myself well. The data can be imported without problems as the restriction is not set on the country zip model. I get confused by the country_zip module of trytonspain [1], which is broken with this changeset as the subdivision used will not be valid using the new domain, but this is probably part as other issue. So I removed the country review for this issue. 

[1] https://bitbucket.org/trytonspain/trytond-country_zip/src/064d1fd42823eac25c90f0eea8fe2af5a6eb0dcf/address.py?at=default&fileviewer=file-view-default#address.py-20
msg45374 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-12-17.23:46:12
I think if the standard data can not be imported, it means that the constraint is wrong.
review48681002 updated at https://codereview.tryton.org/48681002/#ps1
msg45355 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-12-17.18:19:55
I've just noticed that this issue will break the trytond_import_zip script for Spain. Here is review48681002 which updates it to apply also the country subdivision type restriction.
review49501002 updated at https://codereview.tryton.org/49501002/#ps100001
review49501002 updated at https://codereview.tryton.org/49501002/#ps60001
review49501002 updated at https://codereview.tryton.org/49501002/#ps40001
review49501002 updated at https://codereview.tryton.org/49501002/#ps20001
review49501002 updated at https://codereview.tryton.org/49501002/#ps1
msg42069 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-07-05.13:58:39
Here is review49501002 which implements msg42016
msg42016 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-07-02.15:16:08
I would prefer to not modify the country model but have a specific model, a little bit like the party.address.format. And when nothing is defined for a country, it allows all the types.
msg42015 (view) Author: [hidden] (albertca) (Tryton committer) (Tryton translator) Date: 2018-07-02.14:33:59
> I'm wondering if it won't be better to allow to define on the country model 
> which type of subdivision should be used for address formatting. 
>
> This will ease the user interface by using only one subdivision field and
> always show the data expected by the end user.

That sounds good to me.
msg42014 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-07-02.14:04:50
> I guess we must add a field for a second level of subdivision and update address format to use it when needed.

I'm wondering if it won't be better to allow to define on the country model which type of subdivision should be used for address formatting. 

This will ease the user interface by using only one subdivision field and always show the data expected by the end user.
msg42012 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-07-02.13:54:22
I guess we must add a field for a second level of subdivision and update address format to use it when needed.
msg42009 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-07-02.13:20:10
issue5563 restricted the usage of subdivisions without parents on addresses. But this subdivision may not be the most appropriate for the address format introduced by issue5493. This is the case for at least Spain and Italy. On both cases the subdivision is used for address format but it is expected to use the Province type. See: 

http://bitboost.com/ref/international-address-formats/italy/
History
Date User Action Args
2019-02-05 18:59:34cedsetmessages: + msg46744
2019-01-22 11:39:40reviewbotsetmessages: + msg46140
2019-01-22 11:11:46cedsetsuperseder: + Add MultiSelection field
2018-12-30 13:43:45reviewbotsetmessages: + msg45628
2018-12-20 14:36:40pokolisetreviews: 49501002,48681002 -> 49501002
component: - country
messages: + msg45409
2018-12-17 23:46:12cedsetmessages: + msg45374
2018-12-17 18:35:19reviewbotsetmessages: + msg45356
2018-12-17 18:19:56pokolisetreviews: 49501002 -> 49501002,48681002
component: + country
messages: + msg45355
2018-12-10 12:40:50reviewbotsetmessages: + msg45224
2018-11-21 12:43:23reviewbotsetmessages: + msg44960

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