How-to

Odoo Shared Stock for Variants: Sell Loose and Fixed-Weight Bags

Sell a product by weight in the POS and as fixed-size bags online, all drawing from one stock quantity. This Odoo 18 guide uses kits, units of measure and pricelist tiers.

Kalvyai Engineering · · 8 min read

Odoo Shared Stock for Variants: Sell Loose and Fixed-Weight Bags (cover)
On this page

Some products are sold in more than one form but come from the same physical stock. Loose tea, coffee beans, spices, nuts and dried fruit are common examples. You weigh a customer's portion at the counter, you also sell pre-packed bags of 50 g, 100 g and 250 g, and every sale should reduce the same quantity on hand.

If you model this as one product template with six variants, Odoo gives each variant its own stock. That is standard behaviour and there is no setting to merge variant stock. You can get the same result with standard features by structuring the products differently.

This guide covers Odoo 18, Community and Enterprise. The core setup (Inventory, Manufacturing kits, Point of Sale, Website/eCommerce, pricelists) is available in both editions. Connecting a physical scale directly to the POS is the only part that may depend on your edition and hardware. Menu names can differ slightly in other versions.

The approach in one paragraph

Create one stocked product for the loose goods, measured in kilograms. That product holds the only real stock. Sell it by weight in the POS, and use pricelist rules with minimum quantities for the volume price tiers. You do not need three loose variants for that. Then create the fixed-size bags as a separate product with variants, and make each bag variant a kit whose bill of materials consumes 0.050, 0.100 or 0.250 kg of the loose product. When a bag is sold, Odoo deducts the weight from the loose product's stock.

Using tea as the example:

Plain text
Green Tea (Loose)        UoM: kg   <- the only product with stock
  POS only, sold by weight
  Price tiers via pricelist: <0.1 kg, 0.1-0.25 kg, >=0.25 kg

Green Tea Bag            variants: 50 g / 100 g / 250 g
  POS + website
  Each variant = Kit -> consumes 0.050 / 0.100 / 0.250 kg of Green Tea (Loose)

Step 1: Enable the required settings

  1. Go to Inventory > Configuration > Settings and enable Units of Measure.
  2. Go to Sales > Configuration > Settings and enable Variants and Pricelists.
  3. Go to Apps and install Manufacturing. Kits are a type of bill of materials and need this app. You do not have to use manufacturing orders.
  4. In Point of Sale > Configuration > Settings, check that your POS can use pricelists.

Check decimal precision

A weighed sale of 47 g is 0.047 kg. Odoo needs to store quantities with at least three decimals, or that amount will be rounded.

  1. Activate developer mode (Settings > Activate the developer mode).
  2. Go to Settings > Technical > Database Structure > Decimal Accuracy.
  3. Open Product Unit of Measure and set the digits to at least 3 if it is lower.
  4. Open Inventory > Configuration > UoM Categories, then the Weight category, and check that the rounding precision of kg is 0.001 or finer.

Use kilograms rather than grams as the selling unit. Prices are stored with the Product Price precision, which is usually 2 decimals. A price of 106 €/kg stores cleanly. A price of 0.106 €/g would be rounded to 0.11 €/g.

Step 2: Create the loose product

  1. Go to Inventory > Products > Products > New.
  2. Name it, for example Green Tea (Loose).
  3. Set Product Type to Goods and tick Track Inventory.
  4. Set the Unit of Measure and Purchase UoM to kg.
  5. Set the Sales Price to your base per-kg price. In the example that is the under-100 g price, 106.00 €/kg, tax included if your prices are tax included.
  6. On the Point of Sale tab, tick Available in POS and To Weigh With Scale.
  7. On the Sales tab, make sure the product is not published on the website. Do not click Go to Website > Publish for this product.

Only the loose product should ever have stock. Receive purchases and do inventory counts on it, in kg.

Step 3: Add the volume price tiers with a pricelist

You do not need separate Loose 50 g, Loose 100 g and Loose 250 g variants. A pricelist can change the per-kg price based on the quantity weighed.

  1. Go to Sales > Products > Pricelists and open the pricelist your POS uses, or create one.
  2. Add three rules for Green Tea (Loose):
Plain text
Product              Min. Quantity   Price
Green Tea (Loose)    0               106.00 per kg
Green Tea (Loose)    0.100           84.00 per kg
Green Tea (Loose)    0.250           80.00 per kg
  1. Assign this pricelist to your POS in Point of Sale > Configuration > Settings, either as the default or as one of the available pricelists.

A minimum quantity means "this quantity or more". With these rules:

  • 47 g (0.047 kg) is charged at 106 €/kg, which gives 4.98 €.
  • 100 g to 249 g is charged at 84 €/kg.
  • 250 g and above is charged at 80 €/kg.

If your rule is "more than 250 g" rather than "250 g or more", set the last threshold to 0.251.

Test the boundaries before going live. Weigh or type 0.099, 0.100, 0.249 and 0.250 kg in a test session and check that the unit price changes where you expect.

Step 4: Create the bag product with variants

  1. Go to Inventory > Configuration > Attributes and create an attribute, for example Bag size, with the values 50 g, 100 g and 250 g.
  2. Create a new product, Green Tea Bag, with Product Type set to Goods.
  3. Leave the unit of measure as Units. A customer buys one bag.
  4. On the Attributes & Variants tab, add Bag size with the three values.
  5. Set prices. Either set the base price to 5.30 € and add price extras on the attribute values (+3.60 € for 100 g, +14.70 € for 250 g), or set fixed prices per variant in a pricelist.
  6. On the Point of Sale tab, tick Available in POS.
  7. Publish this product on the website.

Because the loose product is a separate product and unpublished, only the three bag sizes appear online. You do not need to hide individual variants.

Step 5: Turn each bag variant into a kit

  1. Go to Manufacturing > Products > Bills of Materials > New.
  2. Set Product to Green Tea Bag and Product Variant to 50 g.
  3. Set Quantity to 1 Units.
  4. Set BoM Type to Kit.
  5. In Components, add Green Tea (Loose) with quantity 0.050 kg.
  6. Save, then repeat for 100 g (0.100 kg) and 250 g (0.250 kg).

You can also use one BoM for the whole template, with three component lines, each limited to one variant through the Apply on Variants column. Both setups work. Three separate BoMs are easier to read.

When a kit is sold, Odoo does not move stock of the bag. It moves stock of the components. The kit's available quantity is calculated from the components. With 2 kg of loose tea, the 250 g bag shows 8 available.

Step 6: Set opening stock and website stock behaviour

  1. Open Green Tea (Loose) and update the on-hand quantity, for example to 2.000 kg. Use Inventory > Operations > Physical Inventory if you prefer counts.
  2. Do not enter stock on the bag product.
  3. On the bag product, decide what the website does when stock runs out: block the sale or keep selling, and whether to show the available quantity.

Step 7: Decide when POS stock is updated

POS sales update stock either in real time or when the session closes, depending on a POS setting.

If you also sell online, use real time where you can. Otherwise counter sales made during the day are not deducted until the session closes, and the website may show stock that is already gone.

Step 8: Test the full flow

Run this test in a copy of your database or with a test product:

Plain text
Start:                          2.000 kg on hand
POS: loose 47 g                 -0.047
POS: 1 x Green Tea Bag 100 g    -0.100
POS: 1 x Green Tea Bag 250 g    -0.250
After POS stock update:         1.603 kg

Website: 2 x Green Tea Bag 100 g
After delivery is validated:    1.403 kg

For website orders, the forecasted quantity drops when the order is confirmed. The on-hand quantity drops when the delivery order is validated. That is standard Odoo behaviour and keeps your stock correct if an order is cancelled before shipping.

To check the result, open Green Tea (Loose) and click the On Hand and Moves History smart buttons. Each move should show the source document: the POS order or the delivery order of the website sale.

Kits or pre-packed stock: choose deliberately

Kits treat bags as virtual. The weight stays in the loose product until a bag is sold. This fits when bags are filled from the same container and you do not need to count filled bags separately.

Sometimes you need to know how many filled bags are on the shelf. For example, the website should only sell bags that already exist, or bags have their own lots and best-before dates. In that case, use a Manufacture BoM instead of a Kit:

  • The bag becomes a real stocked product.
  • Filling bags is recorded as a manufacturing order that consumes loose tea and produces bags.
  • The website sells only produced bags.

This gives more control and more data entry. Most small shops start with kits.

Practical tips

  • Packaging material: you can add the empty bag and label as extra kit components, so packaging stock is deducted too.
  • Many products: if you sell dozens of teas, create the bag products and BoMs by import instead of by hand. Bills of materials and their lines can be imported from a spreadsheet.
  • Reporting: sales reports show bag products and the loose product separately. Inventory valuation and stock levels sit on the loose product only.
  • Scale integration: entering weights by hand works without extra hardware. Connecting a scale directly to the POS needs supported hardware.
  • Barcodes: give each bag variant its own barcode so prepared bags scan at the till.

When standard features are not enough

The setup above covers most shops that sell the same goods loose and pre-packed. A custom module may be worth it in these cases:

  • You must keep everything on a single product template for catalogue or legacy reasons.
  • You need price tiers defined in grams on printed labels.
  • Your rules do not fit the "minimum quantity" logic, such as tiers that apply per order rather than per line.

In those cases a small customisation can compute variant availability from one base quantity, or add pricing logic in the POS. Test it carefully and plan for it in each Odoo upgrade.

How Kalvyai can help

Kalvyai implements and customises Odoo for retail and eCommerce businesses. We can:

  • set up the kit, unit of measure and pricelist structure described here for your full catalogue, including the data import
  • connect the POS and website stock flow and test it
  • build a custom module if your pricing or stock rules go beyond standard features

Tell us how you sell today at kalvyai.com/contact.

Share this article

  • Odoo 18
  • Inventory
  • Point of Sale
  • eCommerce
  • Kits
  • Units of Measure
  • Pricelists

Kalvyai Engineering · Engineering team

The engineers who build, connect and fix business systems at Kalvyai: Odoo, ERPNext, Shopify and AI agents that work inside them with approvals, budgets and an audit trail.

Comments

No comments yet. Questions and corrections are welcome.

Rate this post or leave a comment

Your rating (optional)
Not rated

Comments appear after an editor approves them. See our privacy notice.

Read next

WhatsApp Coexistence for Odoo 19: Setup and User Guide (cover)User guide
Kalvyai EngineeringOdoo

WhatsApp Coexistence for Odoo 19: Setup and User Guide

How to install, connect and use WhatsApp Coexistence for Odoo 19 so your team keeps replying from the WhatsApp Business app while Odoo logs every message on the same number.

7 min read

Newsletter

Get new guides in your inbox.

Practical notes on Odoo, ERPNext, Shopify and AI agents, written by the engineers who build them. No spam, and you can ask to stop at any time.

Prefer a feed? Subscribe by RSS. We use your email only to send new articles. See our privacy policy.