Skip to content

[ADD]pms: change related by compute in checkin name#370

Merged
OCA-git-bot merged 2 commits intoOCA:16.0from
commitsun:16.0-checkin_partner_name_compute
Mar 21, 2026
Merged

[ADD]pms: change related by compute in checkin name#370
OCA-git-bot merged 2 commits intoOCA:16.0from
commitsun:16.0-checkin_partner_name_compute

Conversation

@DarioLodeiros
Copy link
Copy Markdown
Member

This pull request refactors how the name field is managed for the PmsCheckinPartner model. Instead of being a related field, name is now a computed and stored field, allowing for more flexible and accurate name handling, especially when partner_id is not set. The computation logic has also been expanded to derive the name from first and last name fields when necessary.

Field definition and computation improvements:

  • Changed the name field in PmsCheckinPartner from a related field to a computed and stored field, using the _compute_name method for its value.
  • Updated the _compute_name method to depend on partner_id, firstname, lastname, and lastname2, and to compute the name from these fields if partner_id is not set.

ATENTION: Need review pms_l10n_es & pms_fastapi_contact_lastname2 to take account lastname2 in the compute

@jesusVMayor jesusVMayor force-pushed the 16.0-checkin_partner_name_compute branch from 4877f68 to 9a916b5 Compare March 4, 2026 14:19
@DarioLodeiros
Copy link
Copy Markdown
Member Author

/ocabot merge minor

@OCA-git-bot
Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-370-by-DarioLodeiros-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 52fcaef into OCA:16.0 Mar 21, 2026
7 checks passed
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 9441baf. 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