Skip to main content

Dealerships

A Dealership represents a physical dealer branch (e.g. Manila — FOTON). Each dealership:

  • Is linked to one or more Brands.
  • Has its own Odoo 18 instance where Sales Orders will be created when a BPO lead is marked Won.
  • Has a manager contact for won-lead notifications.

:::info Who can edit this? BPO Managers can edit everything including the Odoo Connection credentials. BPO Supervisors can view and edit basic fields. Agents are read-only. :::

Open the Dealerships list

Navigate to BPO CRM → Data → Dealerships.

Dealerships list view

Key columns:

ColumnDescription
CodeUnique short code. Auto-generated as DIST-<id> when synced from distributor if no dealer_name is present.
Complete NameDisplay name combining name, city and brand.
City / RegionLocation.
BrandsLinked brands (many-to-many tags).
ManagerManager name used for notifications.
Odoo ConnectedLast Test Connection result for the remote Odoo 18 instance.
Leads / SOs PushedRunning counters.

Use the search bar filters Connected / Not Connected to triage dealerships that still need setup.

Create a dealership — two paths

If the distributor maintains a list of dealers, you can pull them in one click.

  1. Go to BPO CRM → Data → Brands, open the brand.
  2. Click Sync Dealers in the header.

Sync dealers button on brand

The CRM reads res.partner records where chery_dealer = True on the distributor and creates or updates matching crm.dealership records using:

  • name from res.partner.name
  • code from res.partner.dealer_name, or DIST-<remote_id> if missing, with automatic suffixing if a collision occurs
  • contact fields: phone, mobile, email, street, city
  • manager fields: dealer_gmmanager_name, dealer_gm_emailmanager_email

The brand is automatically linked to each synced dealership.

:::note Error isolation If one dealer record fails to sync (bad data, collision, etc.), the rest continue. Check the server log for Failed to sync dealer '…' entries. :::

After sync, the toast reports how many dealers were created or updated. The brand's Last Dealer Sync timestamp updates.

Path B: Manual create

Click New on the Dealerships list.

New dealership form

Fill in:

GroupFields
Basic InfoName, Code (unique), City, Region, Sequence, Active
ContactPhone, Mobile, Email
ManagerManager Name, Manager Email (used for won-lead notifications)
BrandsMany-to-many — select every brand this dealership sells
AddressFree-text street address

Save.

Configure the Odoo Connection

Open the Odoo Connection tab. (This tab is visible only to BPO Managers.)

Dealership Odoo connection tab

FieldExampleNotes
Odoo URLhttps://manila.uaagi-uno.comThe dealership's own Odoo 18 instance. No trailing slash.
Databasemanila_prodOdoo DB name on that instance.
Usernamebpo_push@manila.uaagi-uno.comService account on the dealer instance.
Password(masked)

Required permissions on the dealer side

The service account must be able to:

  • Create res.partner (to create the customer if they don't already exist).
  • Create / Read sale.order, sale.order.line, product.product.

Test the connection

Click Test Connection.

Test connection ribbon

A green Connected ribbon appears on the form when successful. A yellow Not Connected ribbon shows when a URL is set but the last test failed.

What happens when a lead is Won

When an agent marks a lead as Won:

  1. The CRM validates that the lead's dealership_id has an Odoo connection configured.
  2. Via JSON-RPC, it looks up (or creates) a res.partner in the dealer's Odoo for the lead's customer.
  3. It creates a sale.order in the dealer's Odoo with the lead's vehicle model.
  4. The remote SO reference is stored back on the lead (dealer_so_id, dealer_so_name).
  5. A notification email is sent to the dealership manager_email.

If any step fails the lead stays in Negotiation, and the error is surfaced in the chatter.

Won lead with SO reference

Troubleshooting

SymptomLikely cause
Won lead fails with "Dealership not configured"Dealership has no odoo_url. Open the dealership and fill the Odoo Connection tab.
Won lead fails with AccessError creating sale.orderService account on the dealer instance lacks SO create rights.
Dealer sync collided codes into NAME-<id> suffixesMultiple distributor partners share the same dealer_name. Clean up on the distributor or rename the local codes.
Manager email not received on won leadmanager_email is empty, or dealership's outbound mailer isn't configured.