| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Invoicing (account)
• Point of Sale (point_of_sale) • Sales (sale_management) • Discuss (mail) • Inventory (stock) |
| Lines of code | 2334 |
| Technical Name |
sales_team_target |
| License | OPL-1 |
| Versions | 17.0 18.0 19.0 |
🎯 Sales Team Target
Monthly sales target management for salespersons and Points of Sale with real-time tracking, visual dashboard, and comprehensive reporting.
📋 Overview
Sales Team Target is a comprehensive Odoo 19 module that allows sales managers to define monthly sales targets for individual Salespersons (tracked via invoices) and Points of Sale (tracked via POS orders), then monitor real-time achievement through a visual dashboard, detailed reports, and smart notifications.
Each target operates in one of two modes — ensuring clean separation between invoice-based salesperson performance and POS-based shop performance.
⭐ Key Features
- ✓ Dual Target Types: Salesperson (invoices) or Point of Sale (POS orders)
- ✓ Monthly targets with amount, salesperson/POS assignment, and state tracking
- ✓ Real-time achievement computed from posted invoices & credit notes or POS orders
- ✓ Visual Dashboard: KPI cards, bar charts, trend lines, doughnut breakdown, ranking table
- ✓ Bulk Target Creation: Set targets for all team members or POS shops at once
- ✓ Copy Targets: Clone last month's targets to a new month with % adjustment
- ✓ Performance Reports: PDF and Excel export with summary & detail sheets
- ✓ Arabic / RTL support in PDF and Excel reports
- ✓ Role-based security: Managers see all, salespersons see only their own targets
- ✓ Color-coded progress bars in tree, kanban, and dashboard views
- ✓ Detail line breakdown showing each invoice/POS order contributing to the target
- ✓ Kanban view with card-based layout grouped by month
- ✓ Graph & Pivot views for analytical comparison
📦 Installation
Requirements
| Requirement | Details |
|---|---|
| Odoo Version | 19.0 |
| Depends On |
sale,
point_of_sale,
account,
sales_team
|
| Python Library |
xlsxwriter (for Excel export)
|
Steps
| 1 |
Upload the module Unzip sales_team_target.zip into your Odoo addons directory
(e.g. /mnt/extra-addons/).
|
| 2 |
Install xlsxwriter Run: pip3 install xlsxwriter
|
| 3 |
Update app list Go to Apps → Update Apps List |
| 4 |
Install the module Search for "Sales Team Target" and click Install. |
| 5 |
Clear browser cache Press Ctrl+Shift+R to load the dashboard assets.
|
🔀 Target Types
Each target operates in exactly one mode. The mode determines which field is shown and how achievement is computed:
| Type | Assigned To | Achievement Source | How It's Calculated |
|---|---|---|---|
| Salesperson | A specific user (user_id) |
Posted Invoices & Credit Notes |
Sum of amount_untaxed_signed from account.move
where invoice_user_id = salesperson,
move_type in [out_invoice, out_refund],
state = posted, within the target month
|
| Point of Sale | A POS shop (pos.config) |
POS Orders (paid/done/invoiced) |
Sum of amount_total - amount_tax from pos.order
where config_id = selected POS,
state in [paid, done, invoiced], within the target month
|
➕ Creating a Target
Salesperson Target
| 1 | Navigate to Sales → Sales Targets → All Targets and click New. |
| 2 | Select Target Type = Salesperson (default). |
| 3 | Choose the Salesperson from the dropdown. The Sales Team fills in automatically. |
| 4 | Select the Month and Year. |
| 5 | Enter the Target Amount (the sales goal for this month). |
| 6 | Click Confirm to activate the target. |
POS Target
| 1 | Click New and select Target Type = Point of Sale. |
| 2 | Choose the Point of Sale shop (e.g. "Main Shop", "Branch 1"). |
| 3 | Select Month, Year, and enter the Target Amount. |
| 4 | Click Confirm. |
📋 Bulk Create Targets
Instead of creating targets one by one, managers can create targets for all team members or all POS shops at once.
| 1 | Go to Sales → Sales Targets → Tools → Bulk Create Targets |
| 2 | Select the Target Type (Salesperson or Point of Sale). |
| 3 | Choose the Month and Year. |
| 4 | (Optional) Filter by Sales Team — only salespersons in that team will appear. Leave empty for all. |
| 5 | The wizard auto-populates a list of salespersons or POS shops (excluding those who already have a target for that month). |
| 6 | Enter the Target Amount for each entry. Leave 0 to skip. |
| 7 | Click Create Targets. |
📑 Copy Targets (Templates)
Quickly create next month's targets by copying the previous month's values, with an optional percentage adjustment.
| 1 | Go to Sales → Sales Targets → Tools → Copy Targets |
| 2 | Copy From: Select the source month/year (defaults to previous month). |
| 3 | Copy To: Select the destination month/year (defaults to current month). |
| 4 | Choose the Target Type filter: All Types, Salesperson Only, or POS Only. |
| 5 |
(Optional) Set Adjustment %: e.g. 10 = increase all targets by 10%, -5 = decrease by 5%.
|
| 6 | Skip Existing: If checked, salespersons/POS shops that already have a target for the destination month are skipped. |
| 7 | Click Copy Targets. |
📊 Tracking Achievement
Achievement is automatically computed from live Odoo data whenever you open a target record. The following fields are calculated:
| Field | Description |
|---|---|
| Invoice Amount | Net invoiced amount (invoices minus credit notes) — only for Salesperson targets |
| POS Amount | Total POS order amount (excl. tax) — only for POS targets |
| Achieved Amount | Total achieved (Invoice Amount or POS Amount depending on type) |
| Achievement % | Achieved / Target × 100 |
| Remaining | Target Amount − Achieved Amount |
Refresh Sales Data
Click the ↻ Refresh Sales Data button on any target form to force re-computation and populate the Sales Details tab with every invoice / POS order that contributed to the achievement.
Detail Lines
After refreshing, the Sales Details tab shows each contributing document:
- ✓ Date of the invoice / POS order
- ✓ Source Type badge: Invoice, Credit Note, or POS Order
- ✓ Reference (invoice number or POS reference)
- ✓ Customer name
- ✓ Amount (negative for credit notes)
🔄 Workflow & States
Each target follows a 3-stage workflow:
| State | Description | Who Can Change |
|---|---|---|
| Draft | Target is being set up. All fields are editable. | Manager |
| Confirmed | Target is active and being tracked. Target amount still editable. | Manager (Confirm button) |
| Closed | Month is over. Target is locked (read-only). | Manager (Close button) |
📈 Dashboard
The Dashboard is a custom OWL-based visual interface designed for marketing managers to get a bird's-eye view of team performance at a glance.
Accessing the Dashboard
Navigate to Sales → Sales Targets → Dashboard
(Available to Sales Managers only)
Dashboard Components
1. Month/Year Selector
Use the dropdowns at the top-right to switch between months and years. All KPIs and charts update instantly.
2. KPI Cards
Four gradient-colored cards showing:
- ✓ Total Target – Sum of all target amounts for the selected month
- ✓ Total Achieved – Sum of all achieved amounts with achievement % badge
- ✓ Invoice Sales – Total from salesperson-type targets
- ✓ POS Sales – Total from POS-type targets
3. Status Counters
Three cards showing how many targets are On Target (≥100%), Below Target, and the Overall Achievement %.
4. Bar Chart – Target vs Achieved
Side-by-side bar chart comparing target amount vs achieved amount for each salesperson/POS (top 15). Dark bars = target, green bars = achieved.
5. Trend Chart – Yearly Overview
Line chart showing monthly target and achievement totals for the entire year. Helps managers identify seasonal trends and growth patterns.
6. Doughnut Chart – Sales Breakdown
Shows the proportion of Invoice Sales vs POS Sales in the selected month.
7. Performance Ranking Table
A sortable table ranking all targets by achievement percentage (highest first):
- ✓ 🥇🥈🥉 medals for top 3 performers
- ✓ Color-coded progress bars (green ≥100%, yellow ≥50%, red <50%)
- ✓ Type badge (Salesperson / POS)
- ✓ Click any row to open the target form
🖨️ Reports (PDF & Excel)
Accessing the Report
Navigate to Sales → Sales Targets → Performance Report
Report Wizard
| 1 | Select the Target Type: All Types, Salesperson Only, or POS Only. |
| 2 | Set the Date From and Date To range. |
| 3 | (Optional) Filter by specific Salespersons, Sales Team, or Points of Sale. |
| 4 | Click Print PDF or Export Excel. |
PDF Report
The PDF report includes:
- ✓ Summary cards: Total Target, Achieved, Achievement %, Remaining
- ✓ Summary table: One row per salesperson/POS with color-coded performance
- ✓ Detail table: Every invoice and POS order in the date range
- ✓ RTL support: Automatically switches to right-to-left for Arabic users
Excel Report
The Excel file contains two sheets:
- ✓ Summary sheet: Name, Type, Target, Invoice Amount, POS Amount, Achieved, %, Remaining
- ✓ Details sheet: Every source document (invoice/POS) with customer, date, amount
- ✓ Professional formatting with color-coded cells and number formats
- ✓ RTL layout for Arabic-language users
🔒 Security & Access Rights
| Role | Group | Can See | Can Do |
|---|---|---|---|
| Salesperson | sales_team.group_sale_salesman |
Own targets only (where user_id = current user) |
Read-only access. Can view achievement and generate own reports. |
| Sales Manager | sales_team.group_sale_manager |
All targets (all salespersons and POS) | Full CRUD. Create, confirm, close, bulk create, copy, dashboard, reports. |
user_id = user.id at the database level.
👁️ Available Views
Tree View
Color-coded rows: green (≥100%), yellow (≥50%), red (<50%). Progress bar widget on the Achievement % column. Columns for type, user/POS, month, year, target, invoices, POS, achieved, remaining, and state.
Kanban View
Card-based layout grouped by month. Each card shows the salesperson/POS name, target vs achieved amounts, source breakdown, and a progress bar. Border color indicates performance level.
Form View
Full detail view with status bar, stat button (achievement %), target definition fields, achievement summary, and the Sales Details tab with contributing documents.
Graph View
Bar chart comparing target vs achieved amounts. Accessible from the All Targets action by switching to graph mode.
Pivot View
Multi-dimensional analysis with rows (name) and columns (target type). Measures: target amount, achieved, invoice amount, POS amount.
❓ Frequently Asked Questions
Why is the achieved amount 0 even though I have invoices?
Make sure the invoices are posted (not draft), and that the Salesperson (invoice_user_id) field on the invoice matches the salesperson set on the target. Also check the invoice date falls within the target month.
Why are POS orders not counting?
POS orders must be in paid, done, or invoiced state.
Also verify the Point of Sale config on the target matches the POS session
where the orders were placed.
Can I have both a Salesperson target and a POS target for the same person?
Yes! They are independent. A salesperson target tracks invoices, and a POS target tracks POS orders by shop — not by person. They never overlap.
How do credit notes affect the achievement?
Credit notes (out_refund) are subtracted from the invoice amount.
The field amount_untaxed_signed is already negative for credit notes,
so they automatically reduce the achievement.
The dashboard doesn't load or shows blank charts
Clear your browser cache (Ctrl+Shift+R)
after installing or upgrading the module. The Chart.js library is loaded from a CDN,
so internet access is required for the dashboard.
Can salespersons see each other's targets?
No. Record rules enforce that salespersons can only see targets where
user_id = current user. Only Sales Managers can see all targets.
🤝 Support
For questions, bug reports, or feature requests, please contact your Odoo administrator or the module developer:
./odoo-bin -u sales_team_target -d your_databaseAlways clear browser cache after upgrading.
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