Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
352 Zobrazení

I'm new to odoo and I have a wholesale business where I sell items with different units such as by the gross or by the dozen or per 1000 etc.... I can make the units appear only when a single item is viewed,  not on the product page or latest content pages. I've made the adjustments to UoM in the Sales and Inventory apps and I just can't figure this out.  Also I would like to be able to format the appearance of the units...but that is a lower priority.  Please help!

Avatar
Zrušit
Autor

Thank you for your reply. I'm comfortable using HTML but I'm concerned that if i don't learn Qweb I'll somehow break the site. Do I need to learn Qweb to effectively make the kinds of changes we are discussing?

The key is understanding that QWeb is just HTML with some special attributes that let you access Odoo data safely. Your HTML skills are still your foundation!
Understanding the basics will definitely help you work more confidently and avoid breaking things.

Learn just enough QWeb to,
Understand template inheritance (inherit_id, xpath)
Display field values safely (t-field)
Use basic conditionals (t-if)

And that'll be sufficient

Nejlepší odpověď

Hello Mark,

Odoo's default product pages (shop, category pages) don't display Units of Measure because they're designed for B2C retail where everything is typically sold "per unit." For wholesale operations, you need to customise the templates.

Solution Steps

Enable UoM Settings First (if not already)

Make sure you have the proper settings enabled.

  1. Go to Sales → Configuration → Settings
  2. Under "Product Catalog" section, enable "Units of Measure"
  3. Go to Inventory → Configuration → Settings
  4. Enable "Units of Measure" here as well
  5. Save settings

2. Configure Product UoM

For each product,

  1. Go to Sales → Products → Products
  2. Edit your product
  3. In the "General Information" tab,
    • Set the correct "Unit of Measure" (Dozen, Gross, etc.)
    • Set the "Purchase Unit of Measure" if different
  4. Save the product

3. Customise Website Templates

To show UoM on product listing pages, you'll need to modify the website templates,

Through Website Builder

  1. Go to your website frontend
  2. Click "Edit" in the top menu
  3. Navigate to a product page where units should appear
  4. Look for the price section and try to add a custom HTML block
  5. You can add custom code to display the UoM

Hope this helps.

Avatar
Zrušit