Search 1.3 billion lines of Odoo code on GitHub


Author: La Louve, GRAP, Odoo Community Association (OCA)
License: AGPL-3
Branch: 12.0-mig-pos_backend_communication
Repository: akretion/pos
Dependencies: point_of_sale
Languages: HTML (393, 45.6%), JavaScript (39, 4.5%), PO File (220, 25.5%), Python (44, 5.1%), XML (56, 6.5%), and reStructuredText (110, 12.8%)
Other branches: 10-fix_pos_payment_terminal_assets, 10-mig-pos_order_to_sale_order, 10.0-add-pos_pay_sale_order, 10.0-fix_partner_id_bug, 10.0-imp_pos_product_template, 10.0-mig-pos_order_to_sale_order_2, 10_pos_pay_order_using_session, 10_pos_without_pos_order, 12-telium-fix-script, 12.0-mig-pos_backend_partner, 12.0-mig-pos_remove_pos_category, and 9-remove-hw-modules
Other repositories: 2FM/pos, AK017/pos, AMEERAAA/pos, Aboulwafi/pos, AcruxLab/pos, AwesomeFoodCoops/odoo-production, CB-Gran-Canaria/pos, CGenie/pos, Callino/pos, Change2improve/pos, ClearCorp/oca-pos, Comunitea/pos, ControlWebManager/pos, Cywaithaka/pos, DITIntl/odoo-production, DatabasesWorks/pos-1, Dobtor-OCA/pos, Domatix/pos, ERPLibre/pos, EddieIndboo/pos, Ellyan/pos, EstebanMonge/pos, Firasbessaad/pos, Fkawala/pos, ForgeFlow/pos, GabbasovDinar/pos, Gofekra/pos, Groupe-Informatique-LaCoopSurMer/odoo-production, GrupoAlvamex/pos, GuavanaUX/pos, Guobower/pos, HarshalBhoir/Obeesdoo, Hectorline/pos, HirenDangar/pos, JayVora-SerpentCS/pos-1, Jeisonpernia/pos, JohnTheBeloved/pos, Jzano/pos, KasunDA/pos, Khanstore/pos, KolushovAlexandr/pos, LevelPrime/pos, Mahmoud-Alaa-Eldeen/pos, Martronic-SA/pos, MathBenTech/pos, Mckamba12/pos, Mefistous/pos, MindAndGo/pos, Murtaza-Mithaiwala/pos, NachoAlesLopez/pos, NathanQj/pos, NeatNerdPrime/pos, OCA-MUK/pos, OCA/pos, ORETEK/pos, Odilio/pos, Ommo73/pos, OpusVL/pos, Otsokop/odoo-production, PierrickBrun/pos, PlanetaTIC/pos, PrasongDev/pos-1, QANSEE/pos, QubiQ/pos, RaulCarbonell/pos, SanteLibre/pos, SerpentConsultingServices/pos, SetRac/pos, SimoRubi/pos, Studio73/pos, TRESCLOUD/pos, Tecnativa/pos, Theseverinn/pos, Tonow-c2c/pos, Turiinjargal/pos, VisiionSolucionesTecnologicas/pos, abassvoice/pos, abdulhamidalsalman/pos, abiezersifontes/pos, acsone/pos, acsonefho/pos, adeel982010/pos, adolfoeliazat/pos, ahmed22s885111qq/pos, ajinvn2019/pos, albertkouemou/pos, amendoncabh/pos-extras, ammarofficewla/pos, amygeis/pos, anhvu-sg/pos, ansinaesmejor/pos, apetbiz/pos, apwellington/pos-1, aroodooteam/pos, atilamedia/pos, aurestic/pos, azmeuk/odoo-production, azmeuk/pos, bacgroup/pos, bankmahal/pos, beescoop/Obeesdoo, binhexsystems/pos, bishalgit/pos, carrm29/pos, ccarly/pos, chetanrdhaduk/odoo-production, chetanrdhaduk/pos, cmayo/pos, coopiteasy/Obeesdoo, coopiteasy/pos, corsisa/pos, cristinamartinrod/pos, darmaa/pos, demain-supermarche/odoo-production, detian08/pos, diegogd/pos, digitalsatori/Obeesdoo, druidoo-dev/pos, dzungtran89/odoo-production, e-COSI/pos, eLBati/pos, edkroked/pos, elhamdaoui/pos, elouan-lb/Obeesdoo, elvirekemajou/pos, enmasys/pos, eribowo/pos, estevebadia/odoo-production, etobella/pos, evansochuka/pos, fanguloa/pos, fauzi-tsani/pos, fayezt/pos, fedibits/pos, fjouatte/odoo-production, flotho/pos, fmdl/pos, fraxnet/pos, gaelTorrecillas/pos, globalic/pos, grap/pos, grethellgarcia/pos, guadaltech/pos, haroldtamo/pos, haryoran04/pos, heymanh/pos, hibou-io/oca-pos, hilarak/odoo-production, hoangpq/pos, hpatelserpentcs/pos, iRichGit/pos, invitu/pos, isos/pos, isoscl/pos, jajunero/pos, javaaid/pos, jvpacoin/pos, kach200/pos, karouani/pos, keadanis/pos, kemekongfrancois/pos, kh-hathout/pos, krunal267/odoo-production, lachouettecoop/odoo-production, lambda-is/pos, lauracvilla-zz/pos, leelapriskila/pos, legalsylvain/odoo-production, legalsylvain/pos, leonidasthe300/pos, lideritjnma/pos, lollia6/pos-1, lukehuang/pos, makeplerc/pos, manuelcalerosolis/pos, marionumza/Obeesdoo, mettadipa/pos, mnajjari49/pos, mnoukrati/pos, mondoraemon/pos, mszinte/odoo-production, nabima/pos, neohckim/pos, nilshamerlinck/pos, nthnnl/Obeesdoo, nthnnl/odoo-production, odoo-modules/odoo-production, odoosoft/pos, oswaldasmith/pos, othmancs/pos, ovnicraft/pos, petrus-v/odoo-foodcoops, petypi/pos, phuctranerp/pos, popcomputadores-desenv/pos, primes2h/pos, pscloud/pos, pythoner-3k/pos, quentinDupont/pos, r-sierra/pos, regaby/pos, resources-hub/pos, retail-ecommerce/pos, reynaldiyosfino/pos, rihene-abdelwahed/odoo-production, rm-jamotion/pos, robertsvx27/pos, robinkeunen/Obeesdoo, royalline1/pos, rudisulistyo/pos-1, rupa-acespritech/pos, sanube/pos, saonam/pos, sc4you/odoo-production, sc4you/pos, sebastiken/pos, sendalpegat/pos, siddharth7815/odoo-production, simonjejcic/pos, simplifysolutions/pos, soadrca/pos, socomp/pos, solbutec/pos, solvosci/pos, spacemonkeythe/pos, sprevot44/odoo-production, ssaid/pos, stesi/pos, subteno-it/pos, sunflowerit/pos, suningwz/Obeesdoo, supercoopbdx/odoo-production, syci/pos, takobi-online/pos, tanceee/pos, tegin/pos, thmaph/pos, timbze/pos, tonihr/pos, tools-env/pos, trinanda/pos, uktc87504/pos, unitek-solusi/OCA-pos, valenciaricardos/pos, valentinMERCIER/Obeesdoo, valmarnet/pos, vidtsin/odoo-production, vincgonzo/Obeesdoo, wahello/oca-pos, wajidksa/pos-1, weddingjuma/pos, weisk/pos, y2gsmith/pos, yasmanycastillo/pos, ythak-ylog/pos, yusniermatos/pos, and zarumaru/pos

Point of Sale - Price to Weight

Beta License: AGPL-3 OCA/pos Translate me on Weblate Try me on Runbot

This module extends Odoo Point Of Sale features, to allow to scan barcode with price and to compute according quantity.

In Odoo by default, there are three types of barcode rules for products.

  • 'Unit Product' (type='product'). Scanning a product will add a unit of this product to the current order.
  • 'Priced product' (type='price'). A price is extracted from the barcode, and a new line with the given price and a quantity = 1 is added to the current order.
  • 'Weighted product' (type='weight). A weight is extracted from the barcode, and a new line with the given weight, and a computed price (quantity * Unit price) is added to the current order.

This module add a new option:

  • 'Priced Product (Computed Weight)' (type='price_to_weight'). A price is extracted from the barcode, and a new line with the given price, and a computed quantity (Price / Unit Price) is added to the current order.

This module is usefull in shops with products scaled, to manage correctly stock quantities.


  • Given a product with a unit price of 1,50€ / kg
  • The barcode is 0212345{NNNDD}x where:
    • 02 is the prefix of the barcode rule
    • 12345 is the product number
    • {NNNDD} is the price of the scaled product
    • x is the control digit

if {NNNDD} is 00265, the price is so 2,65€ and the according quantity is 2,65€ / 1,5 €/kg = 1,767 kg

if {NNNDD} is 00810, the price is so 8,10€ and the according quantity is 8,10€ / 1,5 €/kg = 5,400 kg

Table of contents


  • Go to Point of Sale > Configuration > Barcode Nomenclatures
  • Edit your barcode rules, according to your barcodes settings
  • Go to Point of Sale > Configuration > Point of Sale
  • Select the 'Unit Price' field that will be used to convert the price to weight.


By default, this is the field list_price that will be used. If you want to use a custom field, it should be loaded in the javascript file calling

models.load_fields("product.product", ['my_custom_field']);

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.



  • La Louve
  • GRAP


Other credits

Icon parts come from


This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

This module is part of the OCA/pos project on GitHub.

You are welcome to contribute. To learn how please visit