Skip to main content

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

  • In the main menu click on the barcode new button

New icon in Odoo Top Menu
  • In the pop up form, enter the barcode and click on the search button

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:

  • in a normal case, if a barcode is associated to many models. Two typical cases are : product.product / product.template and res.users / res.partner. (Demo data with 3057068106783 to search a product)

  • if the database is corrupted, and a barcode is set to many differents items.

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:

  • 23 is a prefix

  • 91000 is a base code of the product

  • 00500 is the price

  • 2 is a control digit

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

  • If you want to make a search on a field that is not named ‘barcode’, you should overload the function get_barcode_fields of the model barcode.search.

  • If you want to implement another integration of extra data in a barcode via a rule, you should overload the function get_model_by_rule_type of the model barcode.search.

For the time being, three rule types are handled:

  • weight, defined in Odoo stock module

  • price, defined in Odoo point_of_sale module

  • price_to_weight, defined in OCA pos_price_to weight module

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

Contributors

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.

Metadata

Release files for odoo10-addon-barcodes-search 10.0.1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo10-addon-barcodes-search 10.0.1.0.2
File Interpreter ABI Platform Actions
odoo10_addon_barcodes_search-10.0.1.0.2-py2-none-any.whl Python 2 none any Details for odoo10_addon_barcodes_search-10.0.1.0.2-py2-none-any.whl

Release files / odoo10_addon_barcodes_search-10.0.1.0.2-py2-none-any.whl

Download URL odoo10_addon_barcodes_search-10.0.1.0.2-py2-none-any.whl
Size 86.0 kB
Tags Python 2
SHA-256 checksum
How to use checksums
50d7fc7b46297bd28c651940ce43ccc776a997176b6035d06255379b7b56ca89
BLAKE2b-256 checksum
How to use checksums
0416dd68249e7f451029c2a58c7813e5edb50b72adb4047025329357990bce73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/30.4.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.5.3

Security for odoo10-addon-barcodes-search 10.0.1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page