Search By Barcode

Beta License: AGPL-3 OCA/stock-logistics-barcode Translate me on Weblate Try me on Runbot

This module expends Odoo functionality, allowing user to search any item by its barcode.

Table of contents

Usage

New icon in Odoo Top Menu Partner Search Form

Case 1: One item found

If an item is found, the pop up is closed, and the form view of the item is displayed. (Demo data with 0419100000009 to search a partner)

Case 2: Many items found

If many items are found, the list of the items are displayed and the user can go on the according form view by clicking on the button on the end of the line. This case can occur:

Partner and User Result form

Case 3: Barcode with specific rule

In some specifics cases when the barcode contains extra data (like price or weight), the barcode will be different than the product barcode. In that case, the item is displayed, and the data is analysed.

Exemple : Barcode 2391000005002 when:

If this barcode is entered, the product with the barcode 2391000000007 will be returned.

Price Product Search Form

Development

Use in other modules

The search will be done on all the fields named barcode in any models.

For developers, there are one handy method in barcode.search as well:

result = self.env['barcode.search'].search_by_barcode('12345567890123')
@api.model
def search_by_barcode(self, barcode):
    """Return the record associated with the barcode.

    Args:
        barcode (str): Barcode string to search for.

    Returns: a tuple (Field, BaseModel, ExtraData)
        Field: a record of the field that matched the search
        BaseModel: A record matching the barcode, if existing
        ExtraData: An optional dictionnary that provides extra informations
    """

Inheritance

For the time being, three rule types are handled:

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.

Credits

Authors

  • GRAP

Maintainers

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/stock-logistics-barcode project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.