| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Invoicing (account) |
| Lines of code | 954 |
| Technical Name |
qworx_variant_price |
| License | OPL-1 |
| Website | https://qworx.cl |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Invoicing (account) |
| Lines of code | 954 |
| Technical Name |
qworx_variant_price |
| License | OPL-1 |
| Website | https://qworx.cl |
Overview
Automatically manage product variant prices in a dedicated pricelist. When new variants are created, they are automatically added to your default variant pricelist with the template's list price. Supports multi-company environments with per-company defaults and a global fallback.
Key Features
- Auto-add variants: New saleable product variants are automatically added to all relevant default pricelists
- Price sync: Single-variant products automatically sync price when template price changes
- Archive/Unarchive handling: Archived variants are removed from pricelists; unarchived variants are re-added with a price review wizard
- Sale OK toggle: Setting
sale_ok=Falseremoves from pricelist;sale_ok=Truere-adds - Bulk add: Add all existing variants to pricelist with one click in Settings (batched for large databases)
- Price review wizard: Visual editor with template price reference, change detection, and batch apply
- Export/Import: Built-in export template for bulk price updates via Excel
- Multi-company: Per-company defaults with global fallback; cross-company support in wizard
- Duplicate prevention: Constraint prevents duplicate variant items in same pricelist
- Notifications: User notifications for all pricelist changes
Configuration
1. Set Default Variant Pricelist
Go to Sales > Products > Pricelists, open or create a pricelist, and check "Default Variant Pricelist".
- Only one default per company
- Only one global default (no company set)
- Company-specific defaults can coexist with a global default
- Company-specific takes priority over global for that company
2. Add Existing Variants (Optional)
Go to Settings > Sales > Pricing and click "Add All Variants to Pricelist" to populate the pricelist with all existing active saleable variants.
Automatic Behavior
The following actions happen automatically without user intervention:
| Action | What Happens |
|---|---|
| Create new product (with or without variants) | All saleable variants auto-added to ALL relevant default pricelists with template's list price |
Change template list_price (single-variant only) |
Pricelist item price auto-syncs across ALL default pricelists |
Change template list_price (multi-variant) |
No auto-sync — variant prices are manually managed |
| Archive product/variant | Pricelist items removed from ALL default pricelists |
| Unarchive product/variant | Variants re-added to ALL default pricelists; price review wizard opens |
Set sale_ok = False |
Pricelist items removed from ALL default pricelists |
Set sale_ok = True |
Variants re-added to ALL default pricelists |
| Delete product/variant | Pricelist items cascade-deleted by database (automatic) |
| Uncheck "Default Variant Pricelist" | ALL variant-level items in that pricelist are deleted |
| Archive default pricelist | Items preserved (for seamless unarchive); new variants not auto-added while archived |
| Unarchive default pricelist | Conflict check (cannot have two defaults for same company); items restored |
| Delete default pricelist | All variant items cleaned up before deletion |
skip_variant_pricelist_auto_add is in context. Auto-sync is skipped when skip_variant_pricelist_auto_sync is in context. Import operations (import_file context) skip auto-add but still trigger notifications.
Price Review Wizard
The wizard provides a visual editor for reviewing and adjusting variant prices in a pricelist.
How to Open
- From pricelist form: Click "Review Variant Prices" button (visible when "Default Variant Pricelist" is checked)
- From product template form: Click the "Set Variant Prices" stat button (filtered to that template's variants)
- After unarchiving: Wizard opens automatically for the unarchived variants
- After bulk add: Wizard opens automatically showing all newly added variants
Wizard Features
- Shows template price as reference alongside current pricelist price
- Edit New Price column to set desired prices
- Toggle "Use Template" checkbox to reset a variant to its template price
- Click "Set All to Template Price" to reset all lines at once
- Change counter shows how many prices will be updated
- Click Apply to save changes (batched writes grouped by price)
Bulk Price Updates via Excel
- Go to Sales > Products > Pricelists (list view)
- Select your default variant pricelist
- Click Actions > Export
- Select template "Pricelist Items Export"
- Export to XLSX
- Edit the fixed_price column in Excel
- Import the file back using Favorites > Import records
Export Columns
| Column | Purpose | Editable? |
|---|---|---|
name | Pricelist name | No (reference) |
item_ids/id | Item external ID (import key) | No (required) |
item_ids/product_id/display_name | Variant name with attributes | No (reference) |
item_ids/fixed_price | Variant price | Yes |
item_ids/id column. Odoo uses it to match records on re-import. Only edit the fixed_price column.
Multi-Company
How It Works
- Each company can have its own default variant pricelist
- A global pricelist (no company) serves as fallback for companies without a specific default
- When a variant is created, it is added to ALL applicable default pricelists (company-specific + global)
- Products with no company are added to all pricelists; company-specific products only to matching pricelists
Priority
- Company-specific default pricelist (if exists)
- Global default pricelist (no company) as fallback
Wizard & Global Pricelists
When reviewing prices on a global pricelist, the wizard uses elevated permissions to display items for products from all companies. This ensures complete visibility regardless of the current user's company access.
Notifications
Users receive sticky or non-sticky notifications when:
- Variants are auto-added to pricelist (with count)
- Variants are removed from pricelist (archive, sale_ok=False)
- Import adds variants to pricelist (with warning to review prices)
- Default pricelist checkbox is checked or unchecked (with cleanup count)
- Default pricelist is archived, unarchived, or deleted
- Single-variant prices are synced
Constraints & Validation
- Unique default per company: Only one pricelist per company (or one global) can be marked as default
- No duplicate variant items: Cannot have two pricelist items for the same variant with the same minimum quantity in the same pricelist
- Unarchive conflict check: Cannot unarchive a default pricelist if another default already exists for the same company
Technical Details
Models Extended
| Model | Changes |
|---|---|
product.pricelist | Added is_default_variant_pricelist field, constraint, write/unlink overrides, cleanup and helper methods |
product.product | write/create overrides for auto-add/remove, unarchive wizard |
product.template | has_default_variant_pricelist computed field, list_price sync for single-variant |
product.pricelist.item | Duplicate variant item constraint |
res.config.settings | Bulk add action, default pricelist display |
Transient Models
| Model | Purpose |
|---|---|
qworx.variant.price.wizard | Price review wizard with computed lines from pricelist items |
qworx.variant.price.wizard.line | Wizard line with template price, current price, new price, change detection |
Security
- Wizard access:
sales_team.group_sale_salesman(CRUD) - Multi-company record rules on wizard and wizard lines
- Pricelist/item access uses native Odoo rules (inherited)
Dependencies
productsale
Data Files
security/qworx_variant_price_security.xml— Multi-company record rulessecurity/ir.model.access.csv— Wizard access rightsdata/ir_exports_data.xml— Pre-configured export templatewizard/variant_price_wizard_views.xml— Wizard form viewviews/product_pricelist_views.xml— Pricelist form/list extensionsviews/product_template_views.xml— Template stat buttonviews/res_config_settings_views.xml— Settings section
Test Coverage
98 automated tests covering:
- Pricelist default constraint and uniqueness
- Variant auto-add on create
- Variant auto-remove on archive/sale_ok
- Single-variant price sync
- Pricelist cleanup on uncheck/delete
- Wizard functionality (apply, set-all, change detection)
- Duplicate variant item constraint
- Bulk add from settings
- Action buttons
- Multi-company scenarios
License
OPL-1 (Odoo Proprietary License)
Qworx Variant Price
Automatically manage product variant prices in a dedicated pricelist. Supports multi-company environments with per-company defaults and a global fallback.
Configuration
Set Default Variant Pricelist
- Go to Sales > Products > Pricelists
- Open or create a pricelist
- Check "Default Variant Pricelist"
- Save
Rules:
- Only one default per company
- Only one global default (no company set)
- Company-specific defaults can coexist with a global default
- Company-specific takes priority over global for that company
Add Existing Variants
- Go to Settings > Sales > Pricing
- Find "Variant Pricelist Management"
- Click "Add All Variants to Pricelist"
This adds all active saleable variants not yet in the current company's default pricelist. Processed in batches of 1000 for large databases.
Automatic Behavior
Note
Auto-add is skipped when skip_variant_pricelist_auto_add is in context. Auto-sync is skipped when skip_variant_pricelist_auto_sync is in context. Import operations (import_file context) skip auto-add but trigger notifications.
Price Review Wizard
How to Open
- From pricelist form: Click "Review Variant Prices" button
- From product template form: Click "Set Variant Prices" stat button
- After unarchiving: Wizard opens automatically for unarchived variants
- After bulk add: Wizard opens automatically showing newly added variants
Wizard Features
- Shows template price as reference alongside current pricelist price
- Edit New Price column to set desired prices
- Toggle "Use Template" checkbox to reset a variant to its template price
- Click "Set All to Template Price" to reset all lines at once
- Change counter shows how many prices will be updated
- Click Apply to save changes (batched writes grouped by price)
- Cross-company support: global pricelists show items from all companies
Bulk Price Updates via Excel
- Go to Sales > Products > Pricelists (list view)
- Select your default variant pricelist
- Click Actions > Export
- Select template "Pricelist Items Export"
- Export to XLSX
- Edit the fixed_price column in Excel
- Import the file back using Favorites > Import records
Export columns:
- name — Pricelist name (reference only)
- item_ids/id — Item external ID (required for import, do not modify)
- item_ids/product_id/display_name — Variant name with attributes (reference only)
- item_ids/fixed_price — Variant price (editable)
Warning
Do not delete or modify the item_ids/id column. Odoo uses it to match records on re-import. Only edit the fixed_price column.
Multi-Company
How It Works
- Each company can have its own default variant pricelist
- A global pricelist (no company) serves as fallback
- When a variant is created, it is added to ALL applicable default pricelists
- Products with no company are added to all pricelists
- Company-specific products only to matching pricelists
Priority
- Company-specific default pricelist (if exists)
- Global default pricelist (no company) as fallback
Wizard & Global Pricelists
When reviewing prices on a global pricelist, the wizard uses elevated permissions to display and update items for products from all companies, ensuring complete visibility regardless of the current user's company access.
Notifications
Users receive notifications when:
- Variants are auto-added to pricelist (with count)
- Variants are removed from pricelist (archive, sale_ok=False)
- Import adds variants to pricelist (with warning to review prices)
- Default pricelist checkbox is checked or unchecked (with cleanup count)
- Default pricelist is archived, unarchived, or deleted
- Single-variant prices are synced
Constraints & Validation
- Unique default per company: Only one pricelist per company (or one global) can be marked as default
- No duplicate variant items: Cannot have two pricelist items for the same variant with the same minimum quantity in the same pricelist
- Unarchive conflict check: Cannot unarchive a default pricelist if another default already exists for the same company
Technical Details
Models Extended
- product.pricelist — Added is_default_variant_pricelist field, constraint, write/unlink overrides, cleanup and helper methods
- product.product — write/create overrides for auto-add/remove, unarchive wizard
- product.template — has_default_variant_pricelist computed field, list_price sync for single-variant
- product.pricelist.item — Duplicate variant item constraint
- res.config.settings — Bulk add action, default pricelist display
Transient Models
- qworx.variant.price.wizard — Price review wizard with computed lines from pricelist items
- qworx.variant.price.wizard.line — Wizard line with template price, current price, new price, change detection
Security
- Wizard access: sales_team.group_sale_salesman (CRUD)
- Multi-company record rules on wizard and wizard lines
- Pricelist/item access uses native Odoo rules (inherited)
Dependencies
- product
- sale
Test Coverage
98 automated tests covering:
- Pricelist default constraint and uniqueness
- Variant auto-add on create
- Variant auto-remove on archive/sale_ok
- Single-variant price sync
- Pricelist cleanup on uncheck/delete
- Wizard functionality (apply, set-all, change detection)
- Duplicate variant item constraint
- Bulk add from settings
- Action buttons
- Multi-company scenarios
License
OPL-1 (Odoo Proprietary License)
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