Mastering Odoo Product Variant Pricing: 7 Effective Strategies
Are you looking to fine-tune your e-commerce operations and maximize profitability? Understanding and effectively managing Odoo product variant pricing is crucial for businesses dealing with products that come in various sizes, colors, or configurations. Odoo offers robust tools to handle these complex scenarios, allowing you to set flexible prices that reflect the true value of your offerings.
This guide, inspired by real-world questions from an Odoo Insider Q&A session (you can watch the full session here: Odoo Insider Q&A Session on YouTube), dives deep into common challenges and provides actionable, step-by-step solutions. We’ll explore not just pricing, but also related functionalities like managing units of measure, integrating downloadable files, streamlining manufacturing, and even handling sales commissions and dynamic bank details. Get ready to transform your Odoo experience and empower your business with precision and efficiency.
Let’s dive into some of the most pressing questions and their powerful Odoo solutions.
1. Charging Extra for Specific Product Sizes (Percentage-Based)
The Challenge: A common scenario for apparel businesses is needing to charge an extra amount for larger sizes like XL, not as a flat fee, but as a percentage of the base price. While Odoo’s attribute system allows for “extra amounts,” these are typically fixed values, not percentages. How can you implement dynamic, percentage-based Odoo product variant pricing?
The Solution: Leveraging Odoo Price Lists for Dynamic Pricing
Odoo’s robust Price List feature is your go-to for flexible, percentage-based Odoo product variant pricing. Here’s how you can set it up:
-
Set Up Your Products and Variants:
- First, ensure your products are correctly configured with variants. Navigate to the Products section in Odoo.
- Create your base product (e.g., “T-shirt”).
- Go to the “Attributes & Variants” tab. Add attributes like “Color” (e.g., Blue, Green, Black) and “Size” (e.g., S, M, L, XL). Odoo will automatically generate all possible combinations (variants).
- If you don’t have variants installed, you might need to enable them in the Sales or Inventory settings, or simply go to a product and add attributes, Odoo will prompt you to install the module.
-
Explore Attribute Price Extras (and why it’s limited here):
- You can edit an attribute (e.g., “Size”) and for a specific value (e.g., “XL”), add an “Extra Price.” This adds a fixed amount to the base price of any variant containing that attribute value.
- Why it’s not ideal for percentages: This method applies a flat amount. If your base price changes, or you need different percentages for different products, this becomes cumbersome. You’d have to manually calculate the flat amount for each scenario, which quickly becomes unmanageable for intricate Odoo product variant pricing structures.
-
The Power of Price Lists for Percentage Adjustments:
- For true percentage-based adjustments, Odoo’s Price Lists are superior. Go to Sales > Configuration > Price Lists.
- Create a New Price List: Give it a clear name (e.g., “XL Surcharge Price List”).
-
Add Pricing Rules: Inside your new price list, click “Add a line” under the “Price Rules” tab.
- Apply On: Choose “Product Variant.” This allows you to target specific combinations.
- Product Variant: Select the exact variant you want to apply the percentage to (e.g., “T-shirt / Black / XL”). You’ll need a separate rule for each variant if the percentage applies differently, or group them logically if the same percentage applies to all XL sizes across different colors.
- Computation: Here’s the key. Select “Formula.”
-
Formula Details:
- Set “Price based on” to “Sales Price.”
- Input the percentage adjustment. For example, if you want a 10% extra, you’d set the factor to
1.1(100% + 10%). If you want a 5% discount, you’d set it to0.95. - You can also add a “Minimum Quantity” if the percentage only applies for bulk orders.
- Testing: Create a new sales order, select the relevant price list, and then add your T-shirt variants. You’ll see the price dynamically adjust based on your defined percentage formula.
Key Takeaways:
- While attribute price extras are simple for fixed amounts, Price Lists unlock sophisticated Odoo product variant pricing strategies, especially for percentage-based adjustments.
- Each specific variant or group of variants requiring unique percentage pricing will need its own rule within the Price List.
- This approach ensures your pricing remains consistent and automatically adjusts, saving you manual effort and reducing errors.
2. Specific Pricing Based on Unit Pack vs. Individual Units
The Challenge: Your business sells items individually (e.g., a single can of soda) but also in multi-unit packs (e.g., a six-pack). Customers expect a different, often discounted, price per unit when buying the pack. How can Odoo differentiate pricing for a “unit” versus a “pack” when both contain the same core item?
The Solution: Treating Packs as Separate Products for Clear Inventory & Pricing
Odoo’s design philosophy, particularly regarding inventory and pricing, treats items with distinct packaging as separate products. This simplifies tracking, costing, and sales.
-
Create Separate Products:
- Instead of trying to manage “a t-shirt” and “a t-shirt pack” under the same product record, create two distinct product records:
- “T-shirt (Single Unit)”
- “T-shirt (Pack of 6)”
- This is akin to how supermarkets manage a single Coca-Cola can and a 6-pack of Coca-Cola cans – they have different barcodes and are treated as separate stock-keeping units (SKUs).
- Instead of trying to manage “a t-shirt” and “a t-shirt pack” under the same product record, create two distinct product records:
-
Configure Unit of Measures (UoM) & Packaging (Odoo 18.4+):
- In recent Odoo versions (18.4 and newer), the concepts of “Units of Measure” and “Packaging” are more integrated.
- For “T-shirt (Single Unit),” the UoM would be “Unit.”
- For “T-shirt (Pack of 6),” the UoM could also be “Unit,” but the packaging information would clearly indicate “Pack of 6.” However, the core principle remains: the product record itself defines the sellable unit.
-
Define Pricing for Each Product:
- With two distinct product records, you can now easily set their respective prices:
- Set the standard sale price for “T-shirt (Single Unit)” (e.g., €10).
- Set the sale price for “T-shirt (Pack of 6)” (e.g., €50, giving a slight discount per t-shirt compared to buying six singles).
- You can still use Price Lists on these separate products if you need further advanced pricing rules, such as volume discounts on the packs.
- With two distinct product records, you can now easily set their respective prices:
Key Takeaways:
- For clear inventory management and precise Odoo product variant pricing based on packaging, always define unit packs as separate product records.
- This approach aligns with real-world business practices and leverages Odoo’s strengths in product and inventory management.
3. Adding a Downloadable File to a Product Webpage
The Challenge: You have a product (e.g., a complex electronic device or software) and want to provide a downloadable brochure, manual, or specification sheet directly on its website product page. How can you add a link that allows customers to download a file without leaving the product page or going through an awkward intermediary screen?
The Solution: Direct Download Links on Your Product Page
While Odoo Studio can add fields, making them directly downloadable on the website requires either a bit of manual linking or a specialized module.
-
Option 1: Manual Button with Direct Link (Recommended for Simplicity)
-
Upload Your File: First, upload your PDF, user manual, or other relevant file to your Odoo Documents module or any other public file hosting service you use.
-
Make it Public & Get Direct URL: In the Documents module, ensure the file is set to be “Public” or “Shareable” (anyone with the link can view/download). Crucially, you need to find the direct download URL. In Odoo Documents, this is often found in the “Attachments” section or by inspecting the link that initiates a direct download, not just a preview. It will typically look like
/web/content/<attachment_id>/<file_name>. -
Add a Button to Your Product Page:
- Go to your product’s website page (e.g.,
your_odoo_url/shop/product-name). - Click “Edit” in the top right corner.
- Drag and drop a “Button” snippet onto your page from the website builder sidebar.
- Change the button text to something descriptive like “Download Product Brochure.”
- Click on the button, then on the “Edit Link” option.
- Paste the direct download URL you obtained in step 2. You can often use a relative path (e.g.,
/web/content/123/my-brochure.pdf) if the file is hosted within your Odoo instance. - Choose “Open in new window” for a better user experience.
- Save your changes.
- Go to your product’s website page (e.g.,
-
Test Thoroughly: Click the button on the live product page to ensure it initiates a direct download and not just a preview or a redirection to a new page within Odoo Documents.
-
-
Option 2: Using a Dedicated Odoo Module (for more automation/features)
- For a more integrated solution that might allow you to link files directly from a field on the product form to a download button on the website without manual URL hunting, consider exploring modules on the Odoo Apps Store. Search for “product attachments website” or “downloadable files product page.” Modules like “Product Attachments at Websites” often simplify this process.
Key Takeaways:
- The most straightforward way to add downloadable content is with a well-placed button linking to a direct download URL.
- Ensuring the file is publicly accessible and obtaining the correct direct download link are critical steps.
- For more advanced management of attachments, consider third-party Odoo modules.
4. Configuring Manufacturing Processes with Variable Output
The Challenge: In some manufacturing scenarios, the quantity of raw materials is known at the start, but the exact quantity of finished product can vary or is only determined at the end of the production run. How can Odoo’s Bill of Materials (BoM) and Manufacturing Orders (MOs) handle this flexible consumption and variable output?
The Solution: Flexible Consumption and Manual Adjustments in Manufacturing Orders
Odoo offers a “flexible consumption” setting that allows you to adjust quantities as production progresses.
-
Enable Flexible Consumption:
- Go to Manufacturing > Configuration > Settings.
- Look for “Flexible Consumption” and activate it. This setting allows you to over- or under-consume components and adjust the manufactured quantity.
- While there, also check for “By-Products” if you produce secondary items during the main manufacturing process.
-
Configure Your Bill of Materials (BoM):
- Go to Manufacturing > Products > Bills of Materials.
- Select or create the BoM for your finished product.
- Under the “Components” tab, for each component, you can define if its consumption is “Strict” or “Flexible.” Ensure it’s set to “Flexible” if you need to adjust its usage during production.
- If you have a multi-step manufacturing process (work orders), you can also specify at which operation each component is consumed.
-
Execute and Adjust the Manufacturing Order:
- Create a Manufacturing Order for your product.
- Confirm Production: When you start production, you will see the planned consumption and production quantities.
-
Adjust During Production:
- Components: You can manually adjust the “Consumed” quantity of raw materials if you used more or less than planned. This is particularly useful for processes where exact material usage can fluctuate.
- Finished Product: Crucially, you can also adjust the “Produced” quantity of the finished goods. If you ended up producing more or less than initially targeted from the given raw materials, you can update this figure directly on the Manufacturing Order.
- Validation: Once production is complete, validate the MO. Odoo will record the actual consumed and produced quantities, reflecting your flexible process.
-
Alternative: Manufacturing Without a BoM (for extreme flexibility):
- For scenarios requiring complete ad-hoc flexibility without predefined recipes, you can technically create manufacturing orders without a linked Bill of Materials. In this case, you manually add all components and finished products to the MO from scratch.
- Consideration: This method removes the structure and automation benefits of BoMs, making it less suitable for repetitive or standardized processes, but offers ultimate freedom for unique, one-off production runs.
Key Takeaways:
- Odoo’s “Flexible Consumption” setting is essential for managing variable inputs and outputs in manufacturing.
- It allows you to record actual material consumption and finished product quantities, even if they differ from the initial plan.
- For highly unpredictable production, consider direct manual entry on MOs, though this sacrifices the benefits of a structured BoM.
5. Displaying Product Information for “Ask for Price” Buttons
The Challenge: Your e-commerce store offers some products with immediate prices, while others, perhaps high-value or custom items, require customers to “Ask for Price.” When a customer clicks the “Contact Us” button associated with these zero-priced products, you want to know which product they are inquiring about. Odoo’s default contact form often lacks this specific product context.
The Solution: Leveraging the Contact Form’s “Subject” Field
While directly embedding hidden product IDs into the default “Contact Us” URL through Studio is complex and typically requires custom development, Odoo usually populates the “Subject” field of the contact form automatically with the product’s name.
-
Configure “Ask for Price” Products:
- For any product where you want to prompt an “Ask for Price” action, ensure its
Sales Priceis set to0in its product master data. - In Website > Configuration > Settings, under the “Shop” section, enable the “Prevent Sales of Zero Price Product” option. This will automatically replace the “Add to Cart” button with a “Contact Us” button for products with a zero price.
- For any product where you want to prompt an “Ask for Price” action, ensure its
-
Locating the Product Information:
- When a customer clicks the “Contact Us” button from a zero-priced product page, Odoo redirects them to your website’s
/contactuspage. - Crucially, Odoo appends a query parameter to the URL, typically
?subject=<Product_Name>. This means the Subject field of the contact form will be pre-filled with the name of the product the customer was viewing. - Example: If a customer clicks “Contact Us” on “Custom Super Widget,” the URL might become
/contactus?subject=Custom%20Super%20Widget.
- When a customer clicks the “Contact Us” button from a zero-priced product page, Odoo redirects them to your website’s
-
Processing Inquiries:
- When your team receives an inquiry through this form (which typically creates a lead or opportunity in your CRM module), the subject line will already contain the product name.
- Instruct your sales or customer service team to always check the “Subject” field to quickly identify which product the customer is interested in.
Key Takeaways:
- Odoo’s standard functionality for “Ask for Price” products automatically passes the product name to the contact form’s subject.
- This provides a straightforward, out-of-the-box solution to identify product-specific inquiries without custom development.
- Ensure your internal processes leverage this information for efficient follow-up.
6. Automatic Population of Bank Details in Invoice Template Based on Currency
The Challenge: Your business operates internationally and maintains multiple bank accounts, each tied to a specific currency (e.g., a GBP account for invoices in Sterling, a EUR account for Euro invoices). When generating customer invoices, you want Odoo to automatically display the correct bank details on the invoice template based on the invoice’s currency.
The Solution: Automated Actions with Python Scripting
This can be elegantly handled using Odoo’s Automated Actions feature, combined with a small Python script.
-
Set Up Your Bank Accounts in Odoo:
- Go to Accounting > Configuration > Bank Accounts.
- Create separate bank account records for each currency you operate with (e.g., “Main EUR Account,” “Main GBP Account”).
- Important: Note the internal
IDfor each of these bank account records. You can find this by activating Odoo’s developer mode (Settings > Developer Tools icon in the top right > Activate the Developer Mode). Then, go to the bank account record, and in the “Debug” dropdown (bug icon), select “View Metadata” or simply hover over the field; the ID will often be displayed in the URL or a tooltip. For example, your EUR account might have ID3and your GBP account ID4.
-
Create an Automated Action:
- Navigate to Settings > Technical > Automated Actions. (You’ll need developer mode activated).
- Click “Create” to set up a new automation.
- Name: “Auto-Populate Bank Based on Currency” (or similar descriptive name for Nyla’s case).
- Model: Select
Account Move. This is the model for all invoices, bills, and journal entries. - Trigger: Choose “On UI Change.”
- Fields to Trigger: Select
Currency. This means the action will fire whenever the currency field on anAccount Movechanges. - Apply On: Add a filter to ensure this action only applies to customer invoices:
Type=Customer Invoice. - Action To Do: Select “Execute Python Code.”
-
Python Code: Enter the following script, replacing the
IDnumbers with your actual bank account IDs:# Check if the invoice currency is EUR if record.currency_id.name == 'EUR': # Set the recipient bank to the EUR bank account ID (e.g., ID 3) record.partner_bank_id = env.ref('account.bank_account_3_id') # Replace 3 with actual ID or external ID elif record.currency_id.name == 'GBP': # Set the recipient bank to the GBP bank account ID (e.g., ID 4) record.partner_bank_id = env.ref('account.bank_account_4_id') # Replace 4 with actual ID or external ID -
Self-correction: Using
env.ref('module.external_id')is more robust than hardcoding IDs, as external IDs remain consistent across databases. If you don’t know the external ID, you can use the numerical ID (e.g.,record.partner_bank_id = 3), but be aware this might break if the database is reset or moved. Foraccount.bank_account_3_idas an example, you can find the external ID by going to the bank account in developer mode and clicking “External IDs”. If no external ID is explicitly set, the numerical ID is your only option without custom development. For a simpler solution as demonstrated in the video, numerical IDs are often used. - Save & Test: Save the automated action and then create a new customer invoice. Change the currency to EUR, then to GBP, and observe how the “Recipient Bank” field automatically updates.
Key Takeaways:
- Automated Actions are a powerful Odoo feature for automating business logic.
- Python scripting within automated actions allows for sophisticated conditional logic, such as currency-based bank detail selection.
- Knowing your record IDs (or external IDs for robust solutions) is crucial for accurate scripting.
- Always test automated actions thoroughly in a development or staging environment before deploying to production.
7. Handling Multiple Contacts for the Same Person (Employee, User, Contact)
The Challenge: In Odoo, a single individual might be represented by different record types: a Contact (Res.Partner), an Employee (HR.Employee), and a User (Res.Users). This duality can lead to confusion, especially when trying to invite someone to a meeting or ensuring clean, unified records. How do you manage these interconnections and prevent duplicates?
The Solution: Understanding Odoo’s Relational Data Model and Using Data Cleaning Tools
Odoo is designed with interconnected data models. Understanding these relationships is key to managing a clean database.
-
The Odoo Identity Triangle:
- Contact (Res.Partner): This is the foundational record in Odoo’s Contacts module. It represents any person or company you interact with – customers, vendors, and even your own employees. It’s the primary record for addresses, phone numbers, and general communication.
- Employee (HR.Employee): A record within the HR module representing an individual who works for your organization. When you create an employee, Odoo automatically creates or links them to a
Res.Partner(Contact) record. This link (related_partner_id) ensures employee-specific data is tied to a broader contact profile. - User (Res.Users): A login account (username and password) that grants access to your Odoo system. A user record is typically linked to a
Res.Partner(Contact). When you grant “Portal Access” or “Internal User” access to aRes.Partner, Odoo creates or links aRes.Usersrecord.
-
Invitation Best Practices (Calendar, Meetings):
- For calendar invitations and general external communication, you should primarily use the Contact (Res.Partner) record. This is because all other record types (Employee, User) are typically linked back to a
Res.Partner. When inviting attendees to a meeting in the Calendar module, Odoo presentsRes.Partnerrecords as choices. - The system ensures that even if an employee is invited, the underlying contact record is used, making the invitation process seamless.
- For calendar invitations and general external communication, you should primarily use the Contact (Res.Partner) record. This is because all other record types (Employee, User) are typically linked back to a
-
Preventing and Resolving Duplicates:
- System Behavior: Odoo tries to link existing records. For example, if you create an employee with an email address that already exists for a contact, Odoo often attempts to link them rather than creating a duplicate contact.
-
Data Cleaning Module: If, despite Odoo’s efforts, you end up with duplicate contact records (e.g., two
Res.Partnerrecords for the same person, perhaps created through different import processes or manual entries), you can use the Data Cleaning module.- Go to Settings > Technical > Data Cleaning.
- Select the “Contact” (Res.Partner) model.
- Define or use existing “Duplication Rules” based on fields like “Email,” “Name,” or “Phone Number” (e.g., an exact match on email, or a case-insensitive match on name).
- Odoo will identify potential duplicates. Review these suggestions carefully.
- You can then merge the duplicate records, consolidating all associated information (sales orders, invoices, meetings, etc.) into a single, clean
Res.Partnerrecord. This process is irreversible, so proceed with caution.
Key Takeaways:
- Embrace Odoo’s interconnected data model: Contact is the central hub, linked to Employee and User records.
- Always use the Contact (Res.Partner) record for invitations and primary communication.
- Regularly use the Data Cleaning module to identify and merge duplicate contact records, ensuring data integrity and a clean database.
Conclusion: Empower Your Odoo Operations with Precision
Mastering Odoo product variant pricing and navigating the nuances of Odoo’s powerful features can significantly enhance your business operations, from sales and e-commerce to manufacturing and HR. The solutions discussed in this guide, drawn from real-world challenges, demonstrate Odoo’s flexibility and depth.
By implementing percentage-based pricing for variants using price lists, defining distinct products for different packaging, providing direct downloadable files, leveraging flexible manufacturing, and streamlining your bank details and contact management, you empower your team with greater efficiency and accuracy. Odoo is a comprehensive platform, and by understanding how its modules interoperate, you can unlock its full potential to drive your business forward.
Ready to optimize your Odoo instance even further? Explore Odoo’s extensive documentation or reach out to an Odoo expert for tailored solutions. Your journey to a more streamlined and profitable business starts with precision and knowledge!
Discover more from teguhteja.id
Subscribe to get the latest posts sent to your email.

