[FIX] website_sale_delivery: if state_ids is not specified, all states supported

Set up a delivery method that has a country set on it, but no states
(e.g. USA)

When the client is required to fill his address info in and when he chooses USA as the country

Before this commit:
The selection field where the states are selectable is not displayed.

After this commit:
All the states of the country are selectable

The usability choice is to say that if states are not specified on the delivery method
that means all states are supported

OPW 1818591
This commit is contained in:
Lucas Perais (lpe)
2018-03-06 13:16:43 +01:00
parent 5e6bb745e8
commit d59fe9c58c
@@ -35,5 +35,7 @@ class ResCountry(models.Model):
states = res
break
states |= carrier.state_ids
if not states:
states = states.search([('country_id', '=', self.id)])
res = res & states
return res