Back

What is the CRM scope?

The CRM scope is your single source of truth for everyone you do business with: customers, vendors, and the people inside those organisations. In the current release, this means a rich Partner master (model basepartner, defined in the base module) that's reused by every business module β€” Sales, Purchase, Accounting, HR β€” to identify the counter-party of a transaction.

A "true" CRM with Leads, Opportunities, Sales Pipeline stages, and Activity timelines is on the product roadmap but not yet implemented. Today, you can manage contacts, classify them as Customer / Vendor / both, organise them by category & title, and rely on Sales / Purchase modules to surface them in their respective workflows.

ℹ️

Honest scope note

The CRM scope card points to the partners module, but the substance lives in base.basepartner. The partners module itself is a developer playground showcasing widgets (image, barcode, lazy fields, encryption) β€” useful as a reference, not as a production CRM tool. Use the Contacts chapter below for actual partner management.

Where Partners fit in the business flow

Contact→ Lead→ Opportunity→ Quotation→ Sales Order→ Customer

Filled boxes are the stages owned today. Lead and Opportunity are roadmap items. Once a Quotation is confirmed and becomes a Sales Order, the contact automatically counts as a paying customer in reports.

What ships in the CRM scope

CapabilitySourceKey Models
Universal contact master (Customer + Vendor)basebasepartner
Partner classification (type / entity type)basebasepartner.partner_types
Categories & titles for groupingbasebasepartnercategory, basepartnertitle
Vendor-side enhancementscore_purchasebasepartner (extended) β€” vendor_code, is_vendor
Customer-side enhancementsmaster_salebasepartner (extended)
Demo / widget showcasepartnerspartner, testrule1, testrule2 (NOT for production)

Prerequisites

  • base module β€” already required by everything; provides basepartner, basepartnercategory, basepartnertitle, plus the partner type infrastructure.
  • core_purchase β€” install if you want vendor-side fields (vendor code, vendor created on) on partners flagged as Vendor.
  • master_sale β€” install if you want customer-side enhancements on partners flagged as Customer.
  • partners module is optional β€” only install if you want the widget showcase / demo data. It is NOT required for partner management.

First-time setup

Install base (if not already)

Most installs already have base. If you're starting clean:

hmx update install base --alias=default --noinput

Install side-modules as needed

Install only the side you'll use:

hmx update install core_purchase master_sale --alias=default --noinput

Open the Contacts menu

From the main menu, open Contacts. The list shows all partners regardless of type. Use filters to focus on Customer or Vendor.

Contacts
All Customers Vendors
NameTypeEmailPhone
(empty β€” no partners yet)
+ Create
Empty Contacts list β€” ready for your first partner

Optional: seed Categories & Titles first

If you want to tag contacts (VIP, Strategic, Reseller) or use formal titles (Mr., Dr., Bapak, Ibu), seed those master lists before adding partners β€” see the Categories & Titles chapter.

Module install order

  • base ships basepartner, basepartnercategory, basepartnertitle, plus the Partner Type records (Customer, Vendor) referenced via base.base_partner_type_customer and base.base_partner_type_vendor.
  • core_purchase extends basepartner with vendor_code and vendor_creation_time; auto-stamped when the Vendor type is added.
  • master_sale extends basepartner with the customer-side counterparts.
  • The partners module declares "category": "Hidden" and is intentionally a sandbox β€” its partner model is unrelated to basepartner and ships test rules and demo widgets.

What is a Contact?

A Contact in HMX is a single record on the basepartner model. It holds identity (name, mobile, phone, email β€” all unique), address (street, city, state, country, ZIP), and classification (Individual or Company; Customer, Vendor, or Both). The same record is referenced by Sales Orders, Purchase Orders, Invoices, and HR records β€” change the email here, it propagates everywhere.

Contacts can be tagged with multiple Categories (e.g. VIP, Reseller, Strategic) and addressed with a Title (Mr., Dr., Bapak). Both Categories and Titles are master lists you control.

How to create a contact

Open Contacts β†’ click Create

Navigate to Contacts, click + Create. The form opens with a blank Partner record.

Fill identity fields

Enter Partner Name (required, max 255 chars). Set Entity Type to Individual or Company. Add Email (unique), Mobile Number (unique), Phone Number (unique).

New Contact
Partner Name
PT Sumber Makmur
Entity Type
Company
Email
contact@sumbermakmur.co.id
Mobile
+62 812 5555 1234
Phone
+62 21 5555 1234
Website
sumbermakmur.co.id
Identity block β€” Email/Mobile/Phone are uniqueness-enforced

Set Partner Type(s)

In the Partner Types field, add one or more of: Customer, Vendor. The same record can be both. Adding the Vendor type triggers auto-stamping of vendor_code (if core_purchase is installed).

Classification
Partner Types
Customer Vendor
Vendor Code
V00001 auto
Same partner β€” both Customer and Vendor; vendor code stamped on save

Fill address & categories

In the Address tab, fill Street, City, State, Country, ZIP. In Categories, add tags from the Category master.

IdentityAddressCategoriesNotes
Street
Jl. Sudirman No. 123
City
Jakarta Selatan
State
DKI Jakarta
Country
Indonesia
ZIP
12190
Address tab β€” six standard fields

Save

On save, uniqueness is enforced (email/mobile/phone); duplicate values raise a clear error. The contact is now visible to every module that consumes basepartner.

Contact rules to know

πŸ“§

Email / Mobile / Phone are unique

All three fields enforce uniqueness across all partners. If you must store multiple contacts of the same person/company, use the address book pattern or distinguish via separate emails.

🏒

Entity type drives display

Setting Company vs Individual changes which fields are shown by default and how the contact is rendered in selection widgets (icon, layout).

πŸ”

Same record, multiple roles

A partner can be Customer + Vendor + (when HR is installed) an Employee β€” all on the same basepartner record. The role flags are independent.

basepartner model essentials

FieldTypeConstraint
nameCharField(255)Required, ordering field
emailEmailFieldUnique
mobile_numberCharField(255)Unique
phone_numberCharField(255)Unique
partner_typesM2M → partner_typeCustomer / Vendor / both
entity_typeCharField (choices)'individual' | 'company'
categoriesM2M → basepartnercategoryFree tagging
titleFK → basepartnertitleOptional honorific
street, street2, zip, city, state, countryAddress blockStandard fields

The classification model

HMX uses a partner_types M2M field instead of a single boolean. This means one record can carry multiple type tags simultaneously: a partner is a Customer, a Vendor, or Both. The Sales menu filters on is_customer = True; the Purchase menu filters on is_vendor = True; both flags are computed from partner_types.

Three classification states

StateWhat it meansVisible in
Customer onlyA buyer β€” appears in Sales workflow as a quotation/order destinationSales β†’ Customers; Contacts (filter: Customer)
Vendor onlyA supplier β€” appears in Purchase workflow as RFQ/PO originPurchase β†’ Vendor β†’ Vendors; Contacts (filter: Vendor)
Customer & VendorBoth β€” common for service businesses where you buy from and sell to the same partnerBoth menus, with separate vendor_code if Purchase is installed

How to change classification

Open the contact form

Find the partner in Contacts, open the form.

Edit Partner Types

In the Partner Types field, add or remove the Customer / Vendor tag.

Edit: PT Sumber Makmur
Customer Vendor + Add
Adding the Vendor tag triggers vendor_code stamping

Save β€” auto-fields stamp on transition

If core_purchase is installed: when a partner first becomes a Vendor, the system auto-generates vendor_code from the purchase.vendor sequence and stamps vendor_creation_time. These fields are locked after creation β€” you cannot edit them later.

PT Sumber Makmur β€” Saved
V00001 auto Β· readonly
22 Apr 2026, 09:14 UTC readonly
Vendor Code stamped on first save with Vendor type

Removing a type does NOT clear stamped data

If you later remove the Vendor tag, the vendor_code stays in place. This protects historical references β€” invoices that printed V00001 still resolve to the same partner.

How is_customer / is_vendor are computed

Both flags are compute-based and depend on partner_types. The compute method (in the respective extending module β€” master_sale for customer, core_purchase for vendor) resolves the partner type record once per batch and sets the boolean. See the Purchase scope's Vendors chapter for the full create/write lifecycle.

Categories

A Partner Category is a free-form tag you can attach to any partner: VIP, Strategic, Reseller, Past Due. Categories are hierarchical (parent / children) so you can nest VIP > VIP β€” Gold > VIP β€” Platinum. Each category has a colour for visual distinction in lists.

How to create a category

Open Categories

Navigate to Contacts → Configuration → Partner Categories.

Partner Categories
NameParentColorActive
VIP—●Yes
↳ VIP β€” GoldVIP●Yes
Reseller—●Yes
Categories β€” hierarchical & colour-tagged

Click Create & fill the form

Enter Name, optionally pick a Parent for nesting. The Color auto-defaults to a random index 1–11.

New Partner Category
Name
Strategic
Parent
β€” (top-level)
Color
● 5
Active
Yes
Adding a top-level "Strategic" category

Save & tag partners

From this point, the category is pickable in the Categories M2M field on every partner form.

Titles

A Partner Title is the honorific used when addressing a contact: Mr., Ms., Dr., Bapak, Ibu. Each title has a long form (Name) and an optional Shortcut for compact display.

How to create a title

Open Titles

Navigate to Contacts → Configuration → Partner Titles.

Add the title

Enter Name (e.g. "Bapak") and optional Shortcut (e.g. "Pak").

Partner Titles
NameShortcut
Mr.Mr
Ms.Ms
Dr.Dr
BapakPak
IbuBu
A localised title list

Save & pick on partner forms

From now on, Title is pickable on every partner form for individual entity types.

Master models

ModelKey fields
basepartnercategoryname, color (1–11), parent → self, parent_path, active, partners (M2M back to basepartner)
basepartnertitlename, shortcut

Capability status

CapabilityTarget ModuleStatusWorkaround Today
Contact master (Partner)baseShippingβ€”
Customer / Vendor classificationbase + core_purchase + master_saleShippingβ€”
Categories / Titles masterbaseShippingβ€”
Lead capture & qualificationcrm (planned)PlannedTrack in spreadsheet, convert direct to Sales Quotation
Opportunity pipeline (Kanban stages)crm (planned)PlannedUse Categories to roughly track stage; or external CRM
Activity timeline (calls, meetings, emails)crm + mail (planned)PlannedUse mail module's chatter on partner record
Sales pipeline forecast / win probabilitycrm + sale (planned)BacklogExternal BI from Sales Order data
Lead source & UTM trackingcrm + core_website (planned)BacklogTag via Categories or custom fields
Email campaign integrationmarketing (planned)BacklogExternal tool (Mailchimp / SendGrid)
Customer portal & self-servicecore_website (planned)BacklogDirect contact via email/phone
πŸ“…
Until the dedicated crm module ships, the recommended approach is: store contacts in basepartner, use Categories for rough segmentation, and let Sales Quotations carry the deal-tracking. The mail module's chatter is the closest thing to an activity timeline.

partners module manifest

{
    "name": "Partners",
    "category": "Hidden",
    "active_rule": True,
    "version": "1.0",
    "depends": ["base", "onboarding", "webx"],
    "data": [
        "data/base_report_data.xml",
        "data/onboarding_data.xml",
        "security/base.model.access.csv",
        "views/partners_views.xml",
        "views/test_rule_views.xml",
        "data/base_report_excel_data.xml",
        "wizard/partner_barcode_scanner_views.xml",
    ],
    "assets": { ... }
}
⚠️
Note "category": "Hidden" β€” this module is intentionally not exposed in the apps store. It is a developer playground for testing widgets (image, barcode, encryption, lazy fields, file upload, decimal references) and the active_rule auto-rule infrastructure (via testrule1 and testrule2).

Models in the CRM scope

ModelModuleRole
basepartnerbaseThe actual contact master β€” used by all business modules
basepartnercategorybaseCategory master (hierarchical, coloured)
basepartnertitlebaseTitle / honorific master
basepartner (extended)core_purchaseAdds vendor_code, vendor_creation_time, is_vendor
basepartner (extended)master_saleAdds customer-side fields
partnerpartnersDemo model β€” distinct from basepartner; used for widget showcase
testrule1, testrule2partnersDemo models for the auto-rule (multi-company / multi-branch) framework

Permissions

There are no CRM-specific roles. Partner CRUD is controlled by the base.group_user ACLs that ship with the base module. When the dedicated crm module lands, expect a CRM Manager / Sales Rep tier similar to the HR or Inventory pattern.

Source files (partners module)

PathRole
__hmx__.pyManifest (Hidden)
models/partner.pyDemo Partner model with widget-showcase fields
models/test_rule.pytestrule1 + testrule2 (auto-rule examples)
views/partners_views.xmlQuick view + form for the demo partner
wizard/partner_barcode_scanner_views.xmlBarcode scanner wizard
urls.py + views.pyDjango routes for legacy partner-list pages
data/onboarding_data.xmlOnboarding tour data