Point of Sale with Weight, Price and Discount Barcode in Odoo

In this blog, I will explain how with slight customization of point_of_sale module, we can make use of weight and price barcode. This is how I have configured the system.

POS Configuration
POS Configuration

Weight Barcode has prefix of ’21’ followed by 6 digits Internal Reference followed by 5 digits weight.

Product Configuration
Product Configuration

Then, when the product is weighed on weighing machine, we get a barcode as follows (Note- This barcode is generated through weighing machines)-

Weight Barcode
Weight Barcode

Now, when this is scan in Point of Scale, Odoo automatically pulls the right product with the right quantity.

Point of Sale
Point of Sale

Similarly, Price Barcode has ’23’ as prefix followed by 6 digits Internal Reference followed by 5 digit numeric price.

Consider you have a product called Decorative Item and its price changes based on customer’s request. So, we can keep one product and change its price in PoS using Price Barcode.


Now, we will generate a price barcode to enable PoS pick the right price as soon as it is scanned. (Note- This barcode is generated using barcode softwares)

Price Barcode
Price Barcode

When this barcode is scanned, Odoo picks the decorative item with the given price.

Point of Sale
Point of Sale

On similar principle, we can make use of Discount Barcode during promotions.

19 thoughts on “Point of Sale with Weight, Price and Discount Barcode in Odoo

  1. Pingback: Point of Sale with 2D Barcode in Odoo | Aasim Ahmed Ansari- OpenERP Expert

    1. Anonymous

      You have to use the Custom EAN instead of using internal reference.

      For instance, you have the barcode of 2192900000186 (just like the example above) then the system will understand that
      – 21: prefix
      – 92900: product code in the weight scale
      – 00018: weight = 0.18 kg

      So in order to make the system work, you have to set a customer EAN.
      Just open up the Customer EAN then key in: 2192900, the system will give you a EAN-13 based on the information.

      Then you can check again. I did the same thing and it works well for me

      1. When you put 2192900 in Customer EAN system gives you 13 digit number. How will you then put the weights in barcode?

        It was not working for me that is why I did customization and now it is extremely smooth.

  2. Anonymous

    Hello I am searching how to make product variants that is different barcode, and, provides a discount. It looks like you have did such, here? Can you please give me a hint of what lines in the code you modified? Or can you post us a link to your code? Or can you make this in a “plug in” and people can buy it from you?

  3. Hello, in version 8 it could do perfect work.

    In version 9 I can not get it to work. Anyone know the answer?

    Anyone with info, or want that detail how to do it in version 8 I wrote to martincasalis@yahoo.com.ar



    Hola, en la versión 8 lo pude hacer funcionar perfecto.

    En la versión 9 no puedo conseguir que funcione. Alguien sabe la solución?

    Quien tenga info, o quiera que le detalle como hacerlo en la versión 8 me escribe a martincasalis@yahoo.com.ar


  4. Hi!,
    I would like to ask, there are some items that are sold by weight. But some times, customers want to buy a fixed retail amount.

    Let’s say they want $10 from item A, so on the scale we put the price and it will tell us when reach that $10 of item A.

    Is there a way were on the POS we could sell $10 of item A, and not 0.458 kg?

    Thanks in advance, btw, i’m on Odoo 8.

  5. Lamin

    hello to all,

    I am using odoo 13, i experience the same with weighting barcode recognition. I am wondering if you can help or point me to a direction how to solve it. my probleme is about the check digit at the end of the barcode.

    Best regards,

    1. Hi Lamine,

      You can avoid the checksum digit of EAN barcodes by setting the barcode encoding to “Any”.
      For that browse to Point of Sale > Configuration > Point of Sale. Open up the configuration you want to edit. Go to Barcode Nomenclature section and open it up. Under weight barcode rule, set the encoding to Any.

      Hope this will resolve your issue.

      1. Lamine

        Hi aasimansari,

        thank you for reply. i am still getting error. please see my setting
        Barcode Pattern 20….{NNDDD}
        item Barcode (in Product): 201010000000
        weighted barcode :201010082707

        please advice
        Thank you

  6. Lamine

    thank you for your support, i finally found out that label format was good.
    It work when i printed the label as UPC (12 digits) and change the barcode nomenclature to any.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s