Lewati ke isi

T3-W02 Parent Linkage Contract

Canonical parent

op.parent is the CANONICAL guardian relation record.

  • Contact identity lives on res.partner via op.parent.name.
  • Login is optional res.users via op.parent.user_id / partner users.
  • Scope: partner company and/or linked students’ company_id (see _parent_scope_domain).

Cardinality (actual Product)

  • One parent may link to multiple children (student_ids M2M).
  • One student may have multiple parent/guardian relations.
  • Relationship type via relationship_id / import relationship string.

Create vs reuse

Path Behavior
Import with parent fields Composite parent key groups rows; create or reuse parent in-cache per import run
Parent admin relation/save Link existing/new relation under company scope
Cross-tenant IDs Must fail closed without existence leakage

Account boundary

  • auto_create_user / import create_accounts may create parent login.
  • Core W02 onboarding does not require parent account creation.
  • When created, DEC-014 credential rules apply (no plaintext password return as Product secret).

Read-scope invariant (mandatory)

Parent A linked only to Child A must not see Child B in the same tenant via list/search/count/direct ID/portal APIs.