Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

How to show prices per measurement unit?

Subscribe

Get notified when there's activity on this post

This question has been flagged
pricesmeasureSKUliterkilogram
2 Replies
226 Views
Avatar
Luc Bernard

In Belgium for food and drinks on price tags it's obliged to publish the price per measurement unit (/liter or /kilogram) in addition to the SKU price.

So, f.e. 1 bottle contains 0,75l of water and costs 1,50 €/pc. Then the water price is 2,00 €/l.

Is there a way to automatically calculate the 2,00 €/l if the product is sold per piece in bottles of 0,75l with barcode?

0
Avatar
Discard
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

Hi,


To automatically calculate and display the price per measurement unit (e.g., €/liter) on price tags in Odoo, even when selling per piece, you can use a computed field and a custom report. Add a field to store the product's volume/weight and another computed field to calculate the price per unit based on the sales price and volume/weight. Then, create a custom QWeb report to display the product name, price, and calculated price per unit on the price tag.

Alternatively, if using Odoo POS, you can modify the POS receipt to include the price per unit. For a simpler but less flexible approach, Odoo Studio can be used to add the necessary fields and modify views. Remember to be consistent with units of measure, consider rounding and localization, and integrate barcode information if needed.

Python

from odoo import models, fields, api


class ProductTemplate(models.Model):  # Or ProductProduct

    _inherit = 'product.template'  # Or 'product.product'


    volume_liters = fields.Float(string='Volume (Liters)', default=1.0)  # Or weight_kg, etc.

    price_per_liter = fields.Float(

        string='Price per Liter',

        compute='_compute_price_per_liter',

        store=True,  # Store the computed value for performance

    )

    @api.depends('list_price', 'volume_liters')  # 'list_price' is the standard sales price field

    def _compute_price_per_liter(self):

        for product in self:

            if product.volume_liters > 0:

                product.price_per_liter = product.list_price / product.volume_liters

            else:

                product.price_per_liter = 0.0

Qweb template

<t t-name="my_module.price_tag">

    <t t-foreach="docs" t-as="product">

        <div class="price_tag">

            <h2><t t-esc="product.name"/></h2>

            <p>Price: <t t-esc="product.list_price"/> €/pc</p>

            <p>Price per Liter: <t t-esc="product.price_per_liter"/> €/liter</p>

        </div>

    </t>

</t>


Hope it helps

0
Avatar
Discard
Avatar
Vashmitha V
Best Answer

Hello there,

For this, you first need to configure the UoM.

Here is the 1 pc Bottle =0.75L, so UoM is L(0.75)


And add an attribute in that product w/o the creation of a variant with an extra price.

Then SO would be,

Here 0.75L water means 1 qty of L(0.75)  + with barcode/labeled (0.5)
=> 1.5=0.5=2



Hope this will help you. Before doing this, decide the product will sold on which UoM is L or L(0.75) or any other measure. This will differ accordingly.

0
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Product variants with the same sku?
SKU
Avatar
Avatar
1
Oct 25
520
SKU productos en mi tienda odoo
SKU
Avatar
Avatar
1
Jul 25
1478
Is it possible to sell based on width and length of a certain piece and it will calculate area automatically? Example making a window from glass sheets of fixed area. Customer request 3 windows of a certain size. you prepare the invoice by entering width and length and it calculates the area automatically and decide on the required glass sheets
measure
Avatar
0
Mar 15
3779
Can I collect prices with OpenERP from a external application ?
prices
Avatar
Avatar
1
Mar 15
4315
Add secondary(mandatory) prices to products
prices webshop
Avatar
Avatar
1
Sep 25
1361
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now