Skip to content

Purchase Configurator

Adds product template selection and variant configuration to Purchase Orders and inventory receiving (Stock Picks), mirroring the sales order configurator pattern.

Why this exists

Nugget purchases Hamilton STAR systems with configurable options (deck size, pipetting channels, accessories). Standard Odoo purchase lines require selecting a specific product variant from a flat list — unusable when a product has dozens of variants. This module lets users select a product template first, then configure the specific variant using a visual configurator dialog.

How it works

The configuration flow

  1. User opens a Purchase Order or Stock Picking form
  2. On the order line, selects a product template (not a variant)
  3. If the template has one variant → auto-selected silently
  4. If the template has multiple variants → configurator dialog opens
  5. User selects attribute values (e.g., deck size, channel count)
  6. Dialog returns the matching variant as the line's product
  7. Pencil icon appears on configured lines for re-configuration

What's different from sales configurator

  • No pricing display — purchase pricing comes from vendor pricelists, not the configurator
  • No optional products — cross-sell is a sales concept
  • Works on Stock Picks — not just POs, so you can configure during receiving too

JS Components

This module includes OWL 2 JavaScript components that extend the sale module's configurator dialog. Check the browser console for errors after Odoo upgrades.

Key Views

  • Purchase Order form — product template field replaces product field on order lines, with pencil icon for re-configuration
  • Stock Picking form — same template selector on move lines for receiving

Configuration

No settings required. The configurator appears automatically for products that have configurable attributes. To make a product configurable, set up product attributes and values on the product template under the "Attributes & Variants" tab.

Test Plan

Basic configuration

#TestExpected Result
01Create a PO, select a product template with multiple variantsConfigurator dialog opens
02Select attribute values and confirmCorrect variant appears on the PO line
03Click pencil icon on a configured lineConfigurator reopens with current selection
04Change configuration and confirmPO line updates to new variant

Single variant

#TestExpected Result
05Select a template with only one variantVariant auto-selected, no dialog
06Select a template with no configurable attributesProduct set directly, no dialog

Stock picking

#TestExpected Result
07Create a receipt (incoming shipment), select a configurable templateConfigurator dialog opens
08Configure and confirmCorrect variant on the move line

Edge cases

#TestExpected Result
09Favorite products appear first in dropdownProducts marked as favorites sort to top
10Non-purchasable products excluded from PO template dropdownOnly purchase_ok = True products appear

Cross-Module Dependencies

  • sale (Odoo core) — provides the product configurator dialog assets that this module extends.
  • purchase (Odoo core) — provides the purchase order model and views.
  • stock (Odoo core) — provides stock picking views where the configurator is also injected.

Nugget Scientific internal documentation