Odoo already lets a delivery method declare the ZIP prefixes it covers.
This gives warehouses the same idea, then answers the question Odoo leaves to whoever
is typing: which warehouse ships this, and by what method? Orders stop shipping from
the wrong side of the country because somebody accepted the default.
- ✓ ZIP prefixes, states and countries per warehouse — longest prefix wins, so a region and a town inside it don't fight
- ✓ A prefix can belong to only one active warehouse; reuse one and it names the warehouse that already owns it
- ✓ Customers resolve from their address, visibly on the contact, and stay overridable by hand
- ✓ Re-resolves on the programmatic paths too — website carts, imports, wizards — where onchanges never fire
- ✓ Ship-to beats bill-to; an explicit choice always wins; a confirmed order is never re-routed
- ✓ Restrict a product to certain warehouses or methods — 33 tests, all passing