Barcode scanner integration with Odoo

Barcode

 
In latest release of mERP we added possibility to use barcode scanner with built-in camera. As long as our application was originally planned as generic, we made it possible to attach barcode scanner to any one2many field. So first of all lets take a look on how final integration looks like.

How it works?

You can test barcode scanner integration with Odoo yourself on demo server:

  • Just click on “Run Demo” button on login screen of mERP
  • Click “Create” (plus icon)
  • After that you will be allowed to select the product using barcode scanner.

 

mERP with Barcode Scanner mERP Scans Barcode mERP received info from barcode

 
For testing purposes we have used below barcode of iPad Mini:

barcode

Source code of the module to apply barcode scanner to “product” field when creating “Stock Move” can be downloaded here.

Technical Specification

As I mentioned before, it is possible to add barcode scanner to any one2many field. So, for example, you may add barcode scanner to select Source Location and Destination Location by simple configuration. Now lets take a look on how it can be done.

Lets have a look on how xml configuration of the “Product” field with attached barcode scanner looks like:

field name=“product_id” barcode_field=“ean13” barcode_type=“ean13” widget=“barcode_scanner”

Let’s discuss each attribute one by one:

widget=“barcode_scanner” – that is required field. It tells mERP that barcode scanner can be used in order to specify value for that field. If widget attribute is specified with value barcode_scanner, it means that mERP will display scan icon near the field.

barcode_field=“ean13” – that is required attribute. It should specify name of the field in related model where application will be searching for EAN. For example, in this case field product_id refers to model “product.product”. That model contains field “ean13” that contains code of product in it. That’s why we specified value “ean13”

barcode_type=“ean13” – non-required attribute. It allows to specify what type of barcode is used for that field. In that case I noted that EAN13 is used. But we can use much more code types if desired. List of all supported code formats are specified here document.


Example of the edited string

Note that for QR-code we use “Free text” field that will contain your code.
 

Techvision Group

Techvision Group

Special thanks to Techvision Group for help in this feature implementation.
 

 

9 Comments:

  • chris on October 15, 2014 at 2:47 pm Reply

    Well seem good but what about with for example one TC55 with integrated barcode reader?
    Is it also possible to use it?

    • Oleg Kuryan on October 17, 2014 at 12:38 pm Reply

      Hi Chris,

      Thank you for your interest in mERP! Regarding your questions about usage of integrated barcode scanner of Motorola TC55. Sure it is possible to use it with some adjustments.
      Motorola TC55 has Android 4.1 installed that is supported by our application. We just need to develop plugin for this.

      If you are interested feel free to contact us at hello@merpapp.com

      Also there is one more article on this topic that we recently posted https://xpansa.com/merp/how-to-make-barcode-scanner-connection-to-odoo/

  • hengky on January 21, 2015 at 5:49 am Reply

    i want to know how to integrate the android app to odoo

    • Oleg on January 24, 2015 at 9:24 pm Reply

      Hello Hengky,
      just login into your Odoo ERP via our app. This is it =)
      Maybe you have some problems with the app. Please feel free to ask us – hello@merpapp.com

  • Daryl on April 15, 2015 at 9:49 am Reply

    I tried to scan a piece of hardware and turns out that it is a different barcode type (code128) which is supported by your application. My query is: if I have many different types of barcodes in one stock room, can I ignore the specific type of barcode and use one field to scan all of the different types ie Scan EAN13, Code128, etc.

    • Administrator on May 28, 2015 at 8:29 am Reply

      Hello Daryl,
      yes, it is possible. As you can see barcode type is not required field. If it is not specified, then the application will search through all possible barcodes.

  • Ayman Salem on May 11, 2018 at 2:44 pm Reply

    i just downloaded it and tried to test this function
    but nothing appeared to open scanning or to access camera
    Is there any changes or problem ?

    Thanks

    • Administrator on May 15, 2018 at 10:29 am Reply

      Hi Ayman,

      have you modified your Odoo instance according to the instruction in the article?
      You need to add code by yourself to all fields you want to have a scanner button.

      Thanks.

  • Aristide on August 16, 2018 at 8:49 pm Reply

    Hello,
    How can add this widget in POS view ?

    Please help me

Leave a Comment:

* - required fields

mERP (Odoo Mobile) & Ventor apps © 2018

Fill in the form to get a “Ventor” trial APK

The “Ventor” app includes the standard “mERP” app

We ask for your basic contact details to help us validate your identity before we open access to our products.
We would like to send the latest updates, news, instructions directly to your email inbox




You will receive an email with a link to download the APK to your email address after you confirm it




Cookie Settings