The current handling of states in the checkout form is flawed - the form displays the an option menu of states for the default country, then provides no way to change the list or to type in a state. It also enforces entering a state for countries that do not need one.
The attached patch modifies this situation in the following ways:
It introduces a new settings property LOCAL_SALES_ONLY, which can be True for sites selling only in their default country (set using the COUNTRY_CODE property) or False for sites selling internationally.
When LOCAL_SALES_ONLY=True, the address form displays a menu with state options for the default country, if that country requires state input, or hides the state field if it does not. A state selection is enforced if the country requires a state selection. The country field is also hidden, and the default country value is entered into the address record.
When LOCAL_SALES_ONLY=False, the form displays a text field for state input. It then enforces the entry if the selected country requires a state, and allows state to be empty otherwise.
It creates a new module: satchmo.contact.common.py, in preparation for a future patch which will add a UI for registered customers to edit their address book entries.
Reported by itai