Addons DevPre-alpha
Sale CRM bridge
Thin bridge module — no models, views, or menus.
Purpose
When a CRM opportunity moves to a Won stage, automatically create a draft quotation (sale.order).
Depends
sale, crm
Implementation
File: sumeru_addons/sale_crm/init.go
- Subscribes to
record.updatedoncrm.lead - Detects Won stage
- Calls
CreateQuotationFromLead()— idempotent (returns the existing order if one is already linked) - Duplicate
Searcherrors are returned, not swallowed - Sets
opportunity_id, customer, salesperson; name patternQ-CRM-{id}
Requirements
Opportunity must have a customer (partner_id); otherwise quotation creation returns an error (no customer).
Install
go run . -- -c sumeru.conf -i sale_crm --stop-after-init