Core DocTypes

Core DocTypes Reference#

This section provides detailed documentation for all DocTypes introduced by Unified Party Hub (UPH).


Party Master#

Table: tabParty Master

The central hub DocType for all party entities. It serves as the single source of truth for legal entities.

Key Features#

  • Tree-based Hierarchy: Supports parent-child relationships for organizational structures
  • Hierarchical Numbering: Automatic numbering based on parent node (e.g., PM-001, PM-001-001)
  • Multi-Role Support: Link Customers, Suppliers, Employees under one entity
  • Primary/Secondary Roles: Define primary role and link secondary roles

Field Descriptions#

FieldTypeDescription
party_nameDataName of the party (searchable)
party_numberDataHierarchical party number (unique)
parent_party_masterLinkParent Party Master (for hierarchy)
is_groupCheckWhether this is a group node
party_typeLinkParty Type (Customer, Supplier, Employee)
group_typeLinkCustomer/Supplier Group
party_type_groupDynamic LinkDynamic link to group type
territoryLinkTerritory assignment
default_currencyLinkDefault currency for transactions
tax_idDataTax identification number
national_idDataNational ID number
passport_numberDataPassport number
business_registration_numberDataBusiness registration number
legal_entity_typeLinkType of legal entity
date_of_establishmentDateDate of establishment
total_linked_partyIntCount of linked parties (read-only)
has_secondary_role_partyCheckIndicates if secondary roles exist
primary_party_masterLinkPrimary Party Master for secondary roles
is_internal_partyCheckMark as internal party
represents_companyLinkCompany for inter-company transactions
is_primary_roleCheckWhether this is the primary role
is_frozenCheckFreeze the party master
disabledCheckDisable the party master
statusSelectStatus (Active, Inactive)
enforce_party_analaytic_accounting_selectionCheckEnforce PAA selection

Child Tables#

  • Party Master Parties: Links to Customers, Suppliers, Employees
  • Party Master Accounts: Account mappings per currency
  • Party Master Role: Role definitions

Party Analytic Accounting#

Table: tabParty Analytic Accounting

Enables Oracle TCA-like site accounting for party-level financial segmentation.

Key Features#

  • Accounting Non-Duplication: Eliminates redundant accounts for branches
  • Multiple Dimension Types: Site, Business Unit, Branch, Territory, Cost Center, Factory/Plant
  • Company-Specific Rules: Configure rules per company
  • Effective Dating: Track validity periods

Field Descriptions#

FieldTypeDescription
party_masterLinkAssociated Party Master
analytic_nameDataDisplay name for the dimension
typeSelectDimension type (Site, Business Unit, etc.)
enabledCheckEnable this dimension
is_defaultCheckDefault dimension for the party
statusSelectStatus (Active, Inactive, Archived)
allow_or_restrictSelectAllow or restrict rule
effective_fromDateEffective start date
effective_toDateEffective end date

Child Tables#

  • Party Analytic Accounting Party: Applicable parties
  • Party Analytic Accounting Allowed Company: Applicable companies

Dimension Types#

  1. Site: Physical locations (warehouses, offices)
  2. Business Unit: Strategic business divisions
  3. Branch: Operational branches
  4. Territory: Geographic territories
  5. Cost Center: Cost allocation centers
  6. Factory / Plant: Manufacturing facilities

Party Master Parties#

Table: tabParty Master Parties (Child Table)

Junction table linking Party Master to ERPNext party records.

Field Descriptions#

FieldTypeDescription
party_typeSelectType (Customer, Supplier, Employee, Shareholder)
partyDynamic LinkDynamic link to the party record
party_nameDataReference party name
currencyLinkCurrency for this link

Usage#

This child table allows a single Party Master to be linked to multiple party records of different types. For example:

  • Party Master “ABC Corp” can link to Customer “ABC Corp” and Supplier “ABC Corp (International)”
  • Each link can have a different currency for multi-currency support

Party Master Settings#

Table: tabParty Master Settings (Single DocType)

Central configuration DocType for UPH.

Field Descriptions#

FieldTypeDescription
override_party_details_apiCheckOverride ERPNext party details API
enforce_strict_currencyCheckEnforce strict currency mapping
enable_party_analytic_accountingCheckEnable PAA functionality
auto_expand_levelsIntTree view auto-expand levels
hide_balanceCheckHide balance in tree view
check_party_master_duplicate_vouchersCheckCheck for duplicate vouchers
duplicate_voucher_actionSelectAction for duplicate (Warn/Stop)
role_to_bypass_duplicate_voucherLinkRole to bypass duplicate check

Child Tables#

  • Party Master Settings Party Type: Party type rules
  • Party Master Settings DocType: Document type configuration
  • Party Master Settings DocField: Field mapping configuration

Party Relationship#

Table: tabParty Relationship

Define N-to-N relationships between parties.

Key Features#

  • Relationship Types: Parent/Subsidiary, Ownership, Management
  • Ownership Percentages: Track ownership stakes
  • Validity Periods: Define relationship effective dates

Field Descriptions#

FieldTypeDescription
from_partyLinkFirst party in relationship
to_partyLinkSecond party in relationship
relationship_typeLinkType of relationship
ownership_percentagePercentOwnership percentage
effective_fromDateStart of validity
effective_toDateEnd of validity
descriptionTextRelationship description

Relationship Types#

  1. Parent/Subsidiary: Corporate hierarchy
  2. Ownership: Shareholder relationships
  3. Management: Management/leadership relationships
  4. Partnership: Business partnerships
  5. Alliance: Strategic alliances

Duplicate Exclusion#

Table: tabDuplicate Exclusion

Rules for excluding certain records from duplicate detection.

Field Descriptions#

FieldTypeDescription
partyDynamic LinkParty to exclude
reasonTextReason for exclusion
valid_fromDateExclusion start date
valid_toDateExclusion end date

Supporting DocTypes#

Party Master Accounts#

Table: tabParty Master Accounts

Account mappings per currency for Party Master.

FieldTypeDescription
companyLinkCompany
currencyLinkCurrency
receivable_accountLinkReceivable account
payable_accountLinkPayable account

Party Master Role#

Table: tabParty Master Role (Child Table)

Role definitions for Party Master.

FieldTypeDescription
party_type_roleLinkParty Type role

Party Master Settings Party Type#

Table: tabParty Master Settings Party Type

Party type rules configuration.

FieldTypeDescription
party_typeSelectParty type
requiredCheckParty Master required
allowedCheckParty type allowed
rule_fieldnameDataField for uniqueness rule

Party Master Settings DocType#

Table: tabParty Master Settings DocType

Document type configuration for Party Master injection.

FieldTypeDescription
parent_doctypeLinkParent document type
document_typeLinkChild document type
party_fieldnameDataParty field name
party_type_fieldnameDataParty type field name
requiredCheckParty Master required

API Integration Points#

UPH injects Party Master into the following transaction types:

  • Sales Invoice / Sales Invoice Item
  • Purchase Invoice / Purchase Invoice Item
  • Journal Entry / Journal Entry Account
  • Payment Entry
  • Sales Order / Sales Order Item
  • Purchase Order / Purchase Order Item
  • Delivery Note / Delivery Note Item
  • Purchase Receipt / Purchase Receipt Item
  • Expense Claim