| 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 | 2366 |
| Technical Name |
sales_team_target |
| License | LGPL-3 |
| 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 17 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 | 17.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.
Please log in to comment on this module