[FIX] Website_Sale: State / Province doesn't appear when needed.
Use case when it happens:
* Go to billing for a product in website
* Modify or create an address
* Select a country without state
* State field disappear
* Select a country with states
* State field doesn't appear -> Bug
If you confirm, it raises an error asking you to fill the state
field and this one reappear.
The bug come from this forward port 1ef4061e68
This fix removes :visible from the jquery selector on state tag selector
since the logic is different in version 10.
opw-707402
This commit is contained in:
committed by
Nicolas Lempereur
parent
3513151e57
commit
c0dffa3433
@@ -395,7 +395,7 @@ odoo.define('website_sale.website_sale', function (require) {
|
||||
//$("input[name='phone']").attr('placeholder', data.phone_code !== 0 ? '+'+ data.phone_code : '');
|
||||
|
||||
// populate states and display
|
||||
var selectStates = $("select[name='state_id']:visible");
|
||||
var selectStates = $("select[name='state_id']");
|
||||
// dont reload state at first loading (done in qweb)
|
||||
if (selectStates.data('init')===0 || selectStates.find('option').length===1) {
|
||||
if (data.states.length) {
|
||||
|
||||
Reference in New Issue
Block a user