コンテンツへスキップ
Odoo メニュー
  • サインイン
  • 無料で15日試す
  • アプリ
    財務
    • 会計
    • 請求
    • 経費
    • スプレッドシート(BI)
    • ドキュメント管理
    • 署名
    販売
    • CRM
    • 販売
    • POS店舗
    • POSレストラン
    • サブスクリプション
    • レンタル
    ウェブサイト
    • ウェブサイトビルダー
    • eコマース
    • ブログ
    • フォーラム
    • ライブチャット
    • eラーニング
    サプライチェーン
    • 在庫
    • 製造
    • 製品ライフサイクル管理 (PLM)
    • 購買
    • 整備
    • 品質
    人事業務
    • 従業員管理
    • 採用
    • 休暇管理
    • 人事評価
    • リファラル
    • フリート
    マーケティング
    • ソーシャルマーケティング
    • メールマーケティング
    • SMSマーケティング
    • イベント
    • マーケティングオートメーション
    • アンケート調査
    サービス
    • プロジェクト管理
    • タイムシート
    • フィールドサービス
    • ヘルプデスク
    • 計画
    • アポイントメント
    生産性向上ツール
    • ディスカッション
    • 承認
    • IoT
    • VoIP
    • ナレッジ
    • WhatsApp
    サードパーティアプリ Odooスタジオ Odooクラウドプラットホーム
  • インダストリー(業種別ソリューション)
    小売
    • 書店
    • アパレルショップ
    • 家具専門店
    • 食料品店
    • 金物店
    • 玩具店
    飲食・ホスピタリティ業界
    • バー・パブ
    • レストラン
    • ファストフード
    • ゲストハウス
    • 飲料販売代理店
    • ホテル
    不動産
    • 不動産会社
    • 建築事務所
    • 建設
    • 不動産管理
    • 造園
    • 住宅所有者組合
    コンサルティング
    • 会計事務所
    • Odooパートナー
    • マーケティングエージェンシー
    • 法律事務所
    • 人材派遣
    • 監査・認証
    製造
    • テキスタイル
    • 金属
    • 家具
    • 飲食
    • 醸造所
    • コーポレートギフト
    ヘルス & フィットネス
    • スポーツクラブ
    • 眼鏡店
    • フィットネスセンター
    • ウェルネス専門家
    • 薬局
    • ヘアサロン
    業種
    • 便利屋
    • IT ハードウェア・サポート
    • 太陽エネルギーシステム
    • 靴メーカー
    • クリーニングサービス
    • 空調設備サービス
    その他
    • 非営利団体
    • 環境機関
    • ビルボードレンタル
    • 写真
    • 自転車リース
    • ソフトウェアリセラー
    すべての業種を見る
  • コミュニティ
    学ぶ
    • チュートリアル
    • ドキュメンテーション
    • 認定
    • トレーニング
    • ブログ
    • ポッドキャスト
    教育サポート
    • 教育プログラム
    • Scale Up! ビジネスゲーム
    • Odooオフィス訪問
    ソフトを入手
    • ダウンロード
    • エディションを比較
    • リリース
    コラボレーション
    • Github
    • フォーラム
    • イベント
    • 翻訳
    • パートナーになる
    • パートナー様向けサービス
    • 会計事務所を登録
    サービス利用
    • パートナー一覧
    • 会計事務所一覧
    • 今すぐ相談する
    • 導入支援サービス
    • お客様一覧
    • サポート
    • アップグレード
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    製品デモを利用する
  • 料金
  • ヘルプ

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

  • CRM
  • e-Commerce
  • 会計
  • 在庫
  • PoS
  • プロジェクト
  • MRP
All apps
コミュニティで交流するには登録する必要があります。
全てのポスト 人々 バッジ
タグ (全て表示)
odoo accounting v14 pos v15
このフォーラムについて
コミュニティで交流するには登録する必要があります。
全てのポスト 人々 バッジ
タグ (全て表示)
odoo accounting v14 pos v15
このフォーラムについて
ヘルプ

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

購読

この投稿に活動があった際に通知を受け取ります

この質問にフラグが付けられました
crmportal-userLeadsresellersodoo18
2 返信
145 ビュー
アバター
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
アバター
破棄
アバター
Ray Carnes (ray)
最善の回答

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
アバター
破棄
アバター
Cybrosys Techno Solutions Pvt.Ltd
最善の回答
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
アバター
破棄
Elijah Nyendwa
著作者

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.

ディスカッションを楽しんでいますか?読むだけでなく、参加しましょう!

今すぐアカウントを作成して、限定機能を利用したり、素晴らしいコミュニティと交流しましょう!

登録
関連投稿 返信 ビュー 活動
See activities dashboard
crm Leads
アバター
アバター
1
6月 24
2556
Auto-fill CRM fields when creating lead from email alias 解決済
crm Leads
アバター
1
5月 22
4715
Facebook forms create leads
crm facebook Leads
アバター
アバター
アバター
アバター
アバター
4
9月 25
5754
I am trying to open the popup dialog from lost when I change the stage on the kanban
crm dialog odoo18
アバター
1
7月 25
753
copy chatter messages from leads to sales order
crm chatter Leads
アバター
アバター
1
2月 24
1920
コミュニティ
  • チュートリアル
  • ドキュメンテーション
  • フォーラム
オープンソース
  • ダウンロード
  • Github
  • Runbot
  • 翻訳
サービス
  • Odoo.shホスティング
  • サポート
  • アップグレード
  • カスタム開発
  • 教育プログラム
  • 会計事務所一覧
  • パートナー一覧
  • パートナーになる
企業情報
  • 会社概要
  • ブランドアセット
  • お問い合わせ
  • 採用情報
  • イベント
  • ポッドキャスト
  • ブログ
  • お客様一覧
  • リーガル情報 • プライバシーポリシー
  • セキュリティ
الْعَرَبيّة 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(オドゥー)は、CRM、eコマース、会計、在庫管理、POS、プロジェクト管理など、企業のさまざまな業務を一つのシステムで管理できる、ベルギー発のオープンソースのERPソフトウェアです。

高機能で使いやすく、完全に統合されたERPとして、ユニークな価値を提供しています。

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