Skip to content

[19.0][FIX] partner_contact_address_default: invalidate parent cache on archive#2349

Open
fsmw wants to merge 1 commit into
OCA:19.0from
fsmw:19.0-fix-partner-contact-address-default-stale-cache
Open

[19.0][FIX] partner_contact_address_default: invalidate parent cache on archive#2349
fsmw wants to merge 1 commit into
OCA:19.0from
fsmw:19.0-fix-partner-contact-address-default-stale-cache

Conversation

@fsmw
Copy link
Copy Markdown
Contributor

@fsmw fsmw commented May 17, 2026

Closes #2347

When a child contact is archived, the parent partner fields partner_delivery_id, partner_invoice_id and partner_contact_id are cleared. Without explicit cache invalidation, stale values can persist in multi-module contexts and be returned by address_get.

Changes:

  • Split parent search and cache invalidation into explicit steps
  • Call invalidate_recordset on aggregated parent set for all three fields
  • Add test to verify no stale cached id after archiving child

Run pre-commit locally: passed.

@OCA-git-bot OCA-git-bot added series:19.0 mod:partner_contact_address_default Module partner_contact_address_default labels May 17, 2026
Copy link
Copy Markdown

@luisDIXMIT luisDIXMIT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review, LGTM!

…ng child contact

When a child contact is archived, the parent partner's delivery/invoice/
contact default fields are cleared. Without explicit cache invalidation,
stale values could be returned by address_get in multi-module contexts
(e.g. auditlog).

Changes:
- Split parents search and cache invalidation into explicit steps
- Call invalidate_recordset on aggregated parent set for all three fields
- Add test_contact_address_archived_cache ensuring no stale id after archive

Fixes OCA#2347
@fsmw fsmw force-pushed the 19.0-fix-partner-contact-address-default-stale-cache branch from 16fa9da to aa3581c Compare June 4, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants