Skip to content

[16.0][FIX] pms: keep the residence country of guests without state - #459

Merged
OCA-git-bot merged 1 commit into
OCA:16.0from
commitsun:16.0-fix-pms-checkin-country-wipe
Oct 17, 2026
Merged

OCA-git-bot merged 1 commit into
OCA:16.0from
commitsun:16.0-fix-pms-checkin-country-wipe

Conversation

@davidpachecop

Copy link
Copy Markdown

Bug: _compute_country_id clears the residence country of any guest without a state whenever the partner or the nationality changes. Most foreign guests have no state, so they lose their country on the first save with an identity document (the partner gets linked) and the check-in fails with "Personal data is missing for check-in". Introduced in the residence fields refactor (cc14d92).

Fix: only assign False when the country is already empty, like the sibling computes.

Tests: new case in test_pms_checkin_partner.

_compute_country_id cleared the residence country of any guest without
a state when the partner or the nationality changed, so most foreign
guests lost it on their first save with an identity document and could
not be checked in ("Personal data is missing for check-in").
@davidpachecop

Copy link
Copy Markdown
Author

@DarioLodeiros could you review this one? Thanks.

@DarioLodeiros

Copy link
Copy Markdown
Member

/ocabot merge minor

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-459-by-DarioLodeiros-bump-minor, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit 99a52cc into OCA:16.0 Oct 17, 2026
7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 60fdbea. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants