Skip to content

[16.0][FIX] pms_api_rest: don't reject a guest for a state of another country - #168

Merged
DarioLodeiros merged 1 commit into
16.0from
16.0-fix-pms_api_rest-residence-state
Oct 13, 2026
Merged

DarioLodeiros merged 1 commit into
16.0from
16.0-fix-pms_api_rest-residence-state

Conversation

@davidpachecop

Copy link
Copy Markdown

Bug: saving a guest from the app fails with "State and country of residence do not match" when zip autocompletion, OCR or a returning customer leaves a state of another country (e.g. a French zip that also exists in Spain gets a Spanish state). For countries without states the app hides that field, so the user cannot clear it and the guest cannot be checked in.

Fix: the guest endpoints (reception and online check-in) drop a residence state that does not belong to the residence country. Spanish residents are not affected: their state is required (INE, SES) and validated as before.

Tests: test_checkin_partner_residence_state (4 tests).

Related: OCA/pms#459 (the residence country of foreign guests is cleared on their first save). Both are needed to check in a foreign guest from the app.

Zip autocompletion, OCR or a returning customer may leave a residence
state of another country, hidden in the app for countries without
states, so the guest could not be saved ("State and country of
residence do not match"). The guest endpoints now drop it; Spanish
residents keep the usual validation (INE, SES).
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

Diff Coverage

Diff: origin/16.0...HEAD, staged and unstaged changes

  • pms_api_rest/services/pms_reservation_service.py (100%)

Summary

  • Total: 10 lines
  • Missing: 0 lines
  • Coverage: 100%

@DarioLodeiros
DarioLodeiros merged commit 568a9b2 into 16.0 Oct 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants