Zum Inhalt springen
Odoo Menü
  • Anmelden
  • Jetzt gratis testen
  • Apps
    Finanzen
    • Buchhaltung
    • Rechnungsstellung
    • Spesenabrechnung
    • Tabellenkalkulation (BI)
    • Dokumente
    • E-Signatur
    Vertrieb
    • CRM
    • Vertrieb
    • Kassensystem – Shop
    • Kassensystem – Restaurant
    • Abonnements
    • Vermietung
    Websites
    • Website-Builder
    • E-Commerce
    • Blog
    • Forum
    • Livechat
    • E-Learning
    Lieferkette
    • Lager
    • Fertigung
    • PLM
    • Einkauf
    • Wartung
    • Qualität
    Personalwesen
    • Mitarbeiter
    • Personalbeschaffung
    • Abwesenheiten
    • Mitarbeiterbeurteilung
    • Personalempfehlungen
    • Fuhrpark
    Marketing
    • Social Marketing
    • E-Mail-Marketing
    • SMS-Marketing
    • Veranstaltungen
    • Marketing-Automatisierung
    • Umfragen
    Dienstleistungen
    • Projekte
    • Zeiterfassung
    • Außendienst
    • Kundendienst
    • Planung
    • Termine
    Produktivität
    • Dialog
    • Genehmigungen
    • IoT
    • VoIP
    • Wissensdatenbank
    • WhatsApp
    Apps von Drittanbietern Odoo Studio Odoo Cloud-Plattform
  • Branchen
    Einzelhandel
    • Buchladen
    • Kleidergeschäft
    • Möbelhaus
    • Lebensmittelgeschäft
    • Baumarkt
    • Spielwarengeschäft
    Essen & Gastgewerbe
    • Bar und Kneipe
    • Restaurant
    • Fast Food
    • Gästehaus
    • Getränkehändler
    • Hotel
    Immobilien
    • Immobilienagentur
    • Architekturbüro
    • Baugewerbe
    • Immobilienverwaltung
    • Gartenarbeit
    • Eigentümervereinigung
    Beratung
    • Buchhaltungsfirma
    • Odoo-Partner
    • Marketingagentur
    • Anwaltskanzlei
    • Talentakquise
    • Prüfung & Zertifizierung
    Fertigung
    • Textil
    • Metall
    • Möbel
    • Speisen
    • Brauerei
    • Firmengeschenke
    Gesundheit & Fitness
    • Sportklub
    • Brillengeschäft
    • Fitnessstudio
    • Therapeut
    • Apotheke
    • Friseursalon
    Handel
    • Handyman
    • IT-Hardware & -Support
    • Solarenergiesysteme
    • Schuster
    • Reinigungsdienstleistungen
    • HLK-Dienstleistungen
    Sonstiges
    • Gemeinnützige Organisation
    • Umweltschutzagentur
    • Plakatwandvermietung
    • Fotostudio
    • Fahrrad-Leasing
    • Software-Händler
    Alle Branchen ansehen
  • Community
    Lernen
    • Tutorials
    • Dokumentation
    • Zertifizierungen
    • Schulung
    • Blog
    • Podcast
    Bildung fördern
    • Bildungsprogramm
    • Scale-Up! Planspiel
    • Odoo besuchen
    Software anfragen
    • Herunterladen
    • Editionen vergleichen
    • Releases
    Zusammenarbeiten
    • Github
    • Forum
    • Veranstaltungen
    • Übersetzungen
    • Partner werden
    • Dienstleistungen für Partner
    • Buchhaltungsfirma registrieren
    Services anfragen
    • Partner finden
    • Buchhalter finden
    • Einen Experten treffen
    • Implementierungsservices
    • Kundenreferenzen
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Eine Demo erhalten
  • Preiskalkulation
  • Hilfe

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Buchhaltung
  • Lager
  • PoS
  • Projekte
  • MRP
All apps
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Hilfe

How can I enforce lead ownership rules for portal users on a reseller CRM module (custom code approach)?

Abonnieren

Erhalten Sie eine Benachrichtigung, wenn es eine Aktivität zu diesem Beitrag gibt

Diese Frage wurde gekennzeichnet
crmportal-userLeadsresellersodoo18
2 Antworten
160 Ansichten
Avatar
Elijah Nyendwa

I’m customizing an Odoo 18 setup where portal users (resellers) can log in to a CRM portal and view or edit opportunities assigned to them.

Right now, the module already:

  • Allows portal users to move opportunities through certain stages.

  • Lets them update key fields and communicate through the chatter.

The client, however, wants an additional lead ownership mechanism that can be enforced.

The idea is that:

  • A portal user can “claim” a lead when they start engaging it.

  • Once claimed, the lead should be locked to that user for a defined period (for example, 48 hours, 14 days, or 30 days depending on activity).

  • Ownership should expire automatically or via some manageable rule if no activity or progress is recorded.

  • Other portal users shouldn’t be able to re-claim or edit that lead until it’s released or expired.

I’m looking for suggestions or examples of how to implement this kind of lead ownership logic cleanly — ideally with a custom model, computed fields, or record rules — but still maintain flexibility for admin overrides.

What would be the best approach from a technical standpoint?

Any patterns or examples from similar portal-based CRM implementations would be very helpful.

0
Avatar
Verwerfen
Avatar
Ray Carnes (ray)
Beste Antwort

We already provide this functionality via the Resellers App:

https://www.odoo.com/documentation/18.0/applications/sales/crm/track_leads/resellers.html

Resellers use their Portal Account to (1) indicate they are interested in a Lead (which converts it into an Opportunity)

Then (2) update the information about Opportunities:


Resellers and Employees can then work on the same Lead / Opportunity together to support a Channel Sales model.

Also, look into the difference between a Lead and an Opportunity. They are both stored in the same model / table but Leads are only available from the Leads Menu, and only when the Leads feature is activated:

1
Avatar
Verwerfen
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Beste Antwort
Hi,

Try the following steps.

1. Add custom fields for ownership tracking:
To enable lead ownership, create three new fields in the crm.lead model, one to store the user who claimed the lead (claimed_by), one for the date the claim was made (claim_date), and one to record when the claim should expire (claim_expiry). The expiry date can be automatically computed using a helper method that sets it based on a configurable claim period (like 48 hours or 14 days). This setup provides the foundation for tracking lead ownership duration and expiration.

2. Add a “Claim” and “Release” button:
Next, add two action buttons on the CRM lead form, “Claim Lead” and “Release Lead.” These buttons trigger Python methods that assign the logged-in user to the claimed_by field or clear it when released. You can also add a computed boolean field is_expired to dynamically check if a lead’s ownership period has expired. This allows users to claim only unclaimed or expired leads, ensuring ownership control is respected.

3. Automatically expire ownership:
To manage expiring claims, create a scheduled action (cron job) that runs periodically, for example, every hour or day. This cron job identifies all leads whose claim_expiry date has passed and automatically resets their ownership fields. It ensures that expired leads become available again to other users without requiring manual intervention.

4. Apply record rules for portal users:
Use Odoo’s record rules to restrict portal users so that they can only edit leads they have claimed and that are still active (not expired). All other leads should be viewable but not editable. The record rule domain checks the claimed_by and claim_expiry fields to determine access rights. Admins or internal users are excluded from these restrictions so they can manage all leads freely.

5. Add flexibility for administrators:
Provide administrators with additional control by adding a “Force Release” option or allowing them to manually reset ownership fields. You can also include an optional is_admin_locked boolean field to prevent automatic expiration for specific cases. This gives admins full flexibility to override lead ownership rules when necessary.

6. Optional enhancement, extend ownership on activity:
For a more dynamic experience, configure the system so that the claim expiry automatically extends whenever the user performs an activity such as updating the stage or posting in the chatter. This can be achieved by overriding methods like message_post or using a compute function that refreshes the claim_expiry date whenever lead activity occurs.

This overall setup keeps the workflow clean, automated, and secure while allowing both portal users and administrators to manage lead ownership efficiently.



Hope it helps

0
Avatar
Verwerfen
Elijah Nyendwa
Autor

Thanks, but I've already tried that method, and I find it a bit redundant. The portal user is automatically assigned a lead when they click "I am interested," so they already own it. Adding claim fields seems to duplicate existing functionality, and the admin can easily remove the lead from the partner by clearing the partner assignment field.

What I'm looking for is something that tracks the assignment time and automatically releases the lead after, for example, 48 hours if no activity occurs.

Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!

Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!

Registrieren
Verknüpfte Beiträge Antworten Ansichten Aktivität
See activities dashboard
crm Leads
Avatar
Avatar
1
Juni 24
2563
Auto-fill CRM fields when creating lead from email alias Gelöst
crm Leads
Avatar
1
Mai 22
4721
Facebook forms create leads
crm facebook Leads
Avatar
Avatar
Avatar
Avatar
Avatar
4
Sept. 25
5772
I am trying to open the popup dialog from lost when I change the stage on the kanban
crm dialog odoo18
Avatar
1
Juli 25
757
copy chatter messages from leads to sales order
crm chatter Leads
Avatar
Avatar
1
Feb. 24
1929
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Herunterladen
  • Github
  • Runbot
  • Übersetzungen
Dienstleistungen
  • Odoo.sh-Hosting
  • Support
  • Upgrade
  • Individuelle Entwicklungen
  • Bildung
  • Buchhalter finden
  • Partner finden
  • Partner werden
Über uns
  • Unsere Firma
  • Markenwerte
  • Kontakt
  • Karriere
  • Veranstaltungen
  • Podcast
  • Blog
  • Kunden
  • Rechtliches • Datenschutz
  • Sicherheit
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo ist eine Suite von Open-Source-Betriebsanwendungen, die alle Bedürfnisse Ihres Unternehmens abdecken: CRM, E-Commerce, Buchhaltung, Lager, Kassensystem, Projektmanagement etc.

Das einzigartige Wertversprechen von Odoo ist, dass es gleichzeitig sehr einfach zu bedienen und voll integriert ist.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now