CRM & Partners Scope
Contact master today β full Lead-to-Opportunity pipeline on the roadmap.
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
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
| Capability | Source | Key Models |
|---|---|---|
| Universal contact master (Customer + Vendor) | base | basepartner |
| Partner classification (type / entity type) | base | basepartner.partner_types |
| Categories & titles for grouping | base | basepartnercategory, basepartnertitle |
| Vendor-side enhancements | core_purchase | basepartner (extended) β vendor_code, is_vendor |
| Customer-side enhancements | master_sale | basepartner (extended) |
| Demo / widget showcase | partners | partner, testrule1, testrule2 (NOT for production) |
Getting Started
Install the prerequisites, then start adding contacts.
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:
Install side-modules as needed
Install only the side you'll use:
hmx update install core_purchase master_sale --alias=default --noinputOpen 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.
| Name | Type | Phone | |
|---|---|---|---|
| (empty β no partners yet) |
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
baseshipsbasepartner,basepartnercategory,basepartnertitle, plus the Partner Type records (Customer, Vendor) referenced viabase.base_partner_type_customerandbase.base_partner_type_vendor.core_purchaseextendsbasepartnerwithvendor_codeandvendor_creation_time; auto-stamped when the Vendor type is added.master_saleextendsbasepartnerwith the customer-side counterparts.- The
partnersmodule declares"category": "Hidden"and is intentionally a sandbox β itspartnermodel is unrelated tobasepartnerand ships test rules and demo widgets.
Contacts (basepartner)
The universal master record for every person and company you do business with.
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).
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).
V00001 autoFill address & categories
In the Address tab, fill Street, City, State, Country, ZIP. In Categories, add tags from the Category master.
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
| Field | Type | Constraint |
|---|---|---|
| name | CharField(255) | Required, ordering field |
| EmailField | Unique | |
| mobile_number | CharField(255) | Unique |
| phone_number | CharField(255) | Unique |
| partner_types | M2M → partner_type | Customer / Vendor / both |
| entity_type | CharField (choices) | 'individual' | 'company' |
| categories | M2M → basepartnercategory | Free tagging |
| title | FK → basepartnertitle | Optional honorific |
| street, street2, zip, city, state, country | Address block | Standard fields |
Customer vs Vendor
How HMX classifies the same partner as buyer, supplier, or both β with auto-stamped fields per role.
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
| State | What it means | Visible in |
|---|---|---|
| Customer only | A buyer β appears in Sales workflow as a quotation/order destination | Sales β Customers; Contacts (filter: Customer) |
| Vendor only | A supplier β appears in Purchase workflow as RFQ/PO origin | Purchase β Vendor β Vendors; Contacts (filter: Vendor) |
| Customer & Vendor | Both β common for service businesses where you buy from and sell to the same partner | Both 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.
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.
V00001 auto Β· readonlyRemoving 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 & Titles
Two master lists you control to tag, group, and address partners.
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.
| Name | Parent | Color | Active |
|---|---|---|---|
| VIP | β | β | Yes |
| β³ VIP β Gold | VIP | β | Yes |
| Reseller | β | β | Yes |
Click Create & fill the form
Enter Name, optionally pick a Parent for nesting. The Color auto-defaults to a random index 1β11.
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").
| Name | Shortcut |
|---|---|
| Mr. | Mr |
| Ms. | Ms |
| Dr. | Dr |
| Bapak | Pak |
| Ibu | Bu |
Save & pick on partner forms
From now on, Title is pickable on every partner form for individual entity types.
Master models
| Model | Key fields |
|---|---|
| basepartnercategory | name, color (1β11), parent → self, parent_path, active, partners (M2M back to basepartner) |
| basepartnertitle | name, shortcut |
CRM Roadmap
What's planned to layer real CRM functionality on top of the partner master.
Capability status
| Capability | Target Module | Status | Workaround Today |
|---|---|---|---|
| Contact master (Partner) | base | Shipping | β |
| Customer / Vendor classification | base + core_purchase + master_sale | Shipping | β |
| Categories / Titles master | base | Shipping | β |
| Lead capture & qualification | crm (planned) | Planned | Track in spreadsheet, convert direct to Sales Quotation |
| Opportunity pipeline (Kanban stages) | crm (planned) | Planned | Use Categories to roughly track stage; or external CRM |
| Activity timeline (calls, meetings, emails) | crm + mail (planned) | Planned | Use mail module's chatter on partner record |
| Sales pipeline forecast / win probability | crm + sale (planned) | Backlog | External BI from Sales Order data |
| Lead source & UTM tracking | crm + core_website (planned) | Backlog | Tag via Categories or custom fields |
| Email campaign integration | marketing (planned) | Backlog | External tool (Mailchimp / SendGrid) |
| Customer portal & self-service | core_website (planned) | Backlog | Direct contact via email/phone |
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.Technical Reference
Manifest, models, and the role of the partners module.
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": { ... }
}
"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
| Model | Module | Role |
|---|---|---|
| basepartner | base | The actual contact master β used by all business modules |
| basepartnercategory | base | Category master (hierarchical, coloured) |
| basepartnertitle | base | Title / honorific master |
| basepartner (extended) | core_purchase | Adds vendor_code, vendor_creation_time, is_vendor |
| basepartner (extended) | master_sale | Adds customer-side fields |
| partner | partners | Demo model β distinct from basepartner; used for widget showcase |
| testrule1, testrule2 | partners | Demo 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)
| Path | Role |
|---|---|
| __hmx__.py | Manifest (Hidden) |
| models/partner.py | Demo Partner model with widget-showcase fields |
| models/test_rule.py | testrule1 + testrule2 (auto-rule examples) |
| views/partners_views.xml | Quick view + form for the demo partner |
| wizard/partner_barcode_scanner_views.xml | Barcode scanner wizard |
| urls.py + views.py | Django routes for legacy partner-list pages |
| data/onboarding_data.xml | Onboarding tour data |