Customer Blocking — Stop Sales for Risky Customers (Bilingual EN/AR)
by Ahmed Magdy https://idealitsetup.com/$ 90.00
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Employees (hr) • Invoicing (account) |
| Lines of code | 749 |
| Technical Name |
am_partner_blocking |
| License | OPL-1 |
| Website | https://idealitsetup.com/ |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Employees (hr) • Invoicing (account) |
| Lines of code | 749 |
| Technical Name |
am_partner_blocking |
| License | OPL-1 |
| Website | https://idealitsetup.com/ |
Customer Blocking
Stop sales for risky customers — keep collections open · Bilingual EN / AR
Overview
Customer Blocking gives credit-control teams a hard stop — not a soft warning — for risky customers. One click freezes a customer from new sales orders, quotations, and outgoing invoices, while leaving payment registration fully open so collections can still chase the existing balance.
Every block is reasoned, audited, and reversible — but only by an authorised user who knows the PIN stored on their own HR employee record. Parent companies cascade the hold to every branch in one shot, and every event is captured in an append-only history log.
Use Case: Acme Corp's cheque bounces. Finance opens the customer, picks "Bad Credit / Bounced Cheque", and blocks. All 3 Acme branches turn red. Sales reps trying to add a new quotation see a clear ⛔ Customer is BLOCKED — العميل متوقف message. Accounts Receivable can still register the customer's payment when it arrives. Once cleared, the AR manager enters their PIN and unblocks — the full timeline is preserved forever.
Live Screenshots from Odoo 18
⛔ Red banner across the customer form when blocked
Bilingual EN / AR alert — visible the second the customer record opens.
🛑 Hard stop on sales / quotations / invoices
Bilingual error explaining who blocked the customer, when, and why.
🚫 Block wizard with reason picker + branch warning
Pick a reason (or your own), add notes — the wizard tells you exactly how many branches will be cascaded.
🔓 PIN-protected unblock wizard
Reads the PIN saved on the user's own HR employee record. Each user has a different code.
📋 Current-block panel on the customer form
Block reason, blocked at, blocked by, free-text notes — all visible at a glance.
📜 Append-only event history under each customer
First entry — every block / unblock survives as its own row with timestamp, user, reason, notes.
🔁 Full history across multiple block / unblock cycles
Decoration-danger for blocks, decoration-success for unblocks — newest first.
Key Features
| ✔ One-click Block button on every customer form with a reason picker (6 pre-loaded reasons, or add your own). |
✔
Hard stop on sales — sale orders, quotations, and
customer invoices (out_invoice /
out_refund) are refused at create / write /
confirm time. No way around it.
|
✔
Payments stay open — account.payment and
journal entries (entry move type) are
unaffected, so collections keep running.
|
| ✔ Vendor / purchase paths untouched — only customer-side moves are gated. |
| ✔ PIN-protected unblock — the unblock code lives on each employee's HR record. Different PIN per user. Rotate anytime without touching login credentials. |
| ✔ Two independent permission groups — Customer Blocker and Customer Unblocker can be assigned independently (segregation of duties). |
| ✔ Branch cascade — blocking a parent company auto-blocks every child contact / branch. Unblocking does the same in reverse. The guard also walks up the parent chain as a safety net. |
| ✔ Append-only history log — every block and unblock is stored as its own row with timestamp, user, reason, notes. Survives multiple cycles. Per-branch. |
| ✔ Red banner + decoration-danger on the customer form and list — block status is impossible to miss. |
| ✔ Search filters — "🚫 Blocked Customers" / "✅ Not Blocked" pre-built in the customer search view. |
| ✔ Bilingual EN / AR — every label, error message, reason and chatter post ships in English and Arabic. RTL-safe. |
How It Works
| Step 1 — Configure: Assign the Customer Blocker group to finance staff who can place a hold. Assign Customer Unblocker to the more senior set (AR manager, CFO). |
| Step 2 — Set PINs: In HR > Employees, open each Unblocker's employee record and set a confidential PIN in the Customer Unblock tab. |
| Step 3 — Block: Click 🚫 Block Customer on the customer form. Pick a reason, add optional notes, confirm. The red banner appears immediately and cascades to every branch. |
| Step 4 — Sales blocked: Any attempt to create / confirm a sale order or post a customer invoice now raises a clear bilingual error. Payment registration is unaffected. |
| Step 5 — Unblock: When the issue is resolved, click 🔓 Unblock Customer, enter the PIN, and confirm. Every block + unblock survives as its own row in the customer's Block Status tab. |
Pre-loaded Block Reasons
| Code | English | Arabic |
|---|---|---|
payment_overdue |
Payment Overdue | تأخر السداد |
credit_limit |
Credit Limit Exceeded | تجاوز سقف الائتمان |
bad_credit |
Bad Credit / Bounced Cheque | تصنيف ائتماني ضعيف / شيك مرتجع |
legal_issue |
Legal Issue | مشكلة قانونية |
admin_hold |
Administrative Hold | إيقاف إداري |
other |
Other | أخرى |
You can add your own reasons from Contacts > Configuration > Block Reasons.
What Gets Blocked (and What Doesn't)
| Action | Behaviour |
|---|---|
| Sale order create / confirm | ✖ BLOCKED |
| Quotation send | ✖ BLOCKED |
Customer invoice (out_invoice / out_refund) |
✖ BLOCKED |
Payment registration (account.payment) |
✔ ALLOWED |
Journal entry (entry move type) |
✔ ALLOWED |
| Vendor invoice / refund | ✔ ALLOWED |
Technical Information
| Attribute | Value |
|---|---|
| Technical Name | am_partner_blocking |
| Version | 18.0.3.0.0 |
| Odoo Version | 18.0 (Community + Enterprise) |
| Dependencies | base, mail, hr, sale, account |
| Models Added |
am.partner.block.reason,
am.partner.block.log,
am.partner.block.wizard,
am.partner.unblock.wizard
|
| Models Extended |
res.partner, hr.employee,
sale.order, account.move
|
| Languages | English (en_US) · Arabic (ar / ar_001) |
| License | OPL-1 (Odoo Proprietary) |
| Price | $90 USD |
Frequently Asked Questions
|
Can I still receive payments from a blocked customer? Yes — that is the whole point. Only sales-side moves are refused. account.payment creation goes through
account.move of type entry, which
stays allowed.
|
|
What about existing draft quotations on the customer? They stay in the database but can't be confirmed or sent while the block is active. Once unblocked they confirm normally. |
|
What if the blocked customer has 3 branches? Blocking the parent cascades to all 3 branches in one shot. Unblocking the parent reverses the cascade. The _check_not_blocked guard also walks UP the
parent chain, so a sale on a branch of a blocked parent
is refused even if the cascade somehow failed.
|
|
Can a user without the Blocker group see the
Block button? No — the button is hidden via groups=, and the wizard double-checks the
permission server-side, so an API call can't bypass it.
|
|
What if someone forgets their PIN? The HR Manager can set a new one from HR > Employees > Customer Unblock tab. PINs are stored in a group-restricted field so HR can reset without prompting a recovery flow. |
|
Is the history log deletable? No — the access rules grant only read / create permissions on am.partner.block.log. Even Blocker /
Unblocker users can't delete past events.
|
Contact & Support
$90 USD
Get professional support, customization, and migration help.
| Developer: | Ahmed Magdy |
| Email: | qarsan4@gmail.com |
| Website: | idealitsetup.com |
| WhatsApp: | +966 509 818 413 |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module