Search By Barcode

barcodes_search
REPOSITORY
REPOSITORYOCA/stock-logistics-barcode
GIT
GIThttps://github.com/OCA/stock-logistics-barcode.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/stock-logistics-barcode/tree/10.0/barcodes_search
VERSION
VERSION 1.0.2
CATEGORY
CATEGORYTools
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), GRAP
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), GRAP
COMMITTERS
COMMITTERSSylvain LE GAL, OCA Transbot, oca-travis, OCA-git-bot
WEBSITE
WEBSITEhttps://github.com/OCA/stock-logistics-barcode
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:19:54
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - barcodes
    - web
    - base
    - product
    - decimal_precision
    - mail
    - base_setup
    - web_kanban
    - bus
    - web_tour
    - report
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
assets_backend assets_backend ir.ui.view qweb Inherits web.assets_backend
view_barcode_search_form barcode.search form New
Models touched (2)

New fields (3)
  • barcode Char
    required=True string='Barcode to Search'
  • line_ids One2many → barcode.search.line
    comodel_name='barcode.search.line' inverse_name='barcode_search_id' readonly=True
  • state Selection
    default='new' selection=[('new', 'New'), ('done', 'Done')]
Public methods (4)
  • action_search(self)
    @api.multi
  • get_barcode_fields(self, model_name=False)
    @api.model
    Return a recordset of fields that represent a barcode, in any model. By default, it will return all fields named "barcode". Note : Overload that function in a custom module, if you define a barcode field with a name different than "barcode".
  • get_model_by_rule_type(self)
    @api.model
    Provides a mapping for nomenclature types to Odoo models. The dictionary returned by this method maps barcode nomenclature rule types (``barcode.rule.type``) to the models that they represent. A barcode nomenclature rule type allows for numerical content to be represented in a barcode by utilizing the `......{NNDDD}` format to indicate the fixed and variable parts of the barcode respectively. Note: Modules adding new barcode nomenclature rule types will need to override this method to update the mapping in order to be supported. For example: * `weight` is defined in the Odoo `stock` module * `price` is defined in the Odoo `point_of_sale ` module * `price_to_weight ` is defined in the OCA `pos_price_to ` module Returns: dict: A mapping of models keyed by their respective barcode rule type (``barcode.rule.type``).
  • search_by_barcode(self, barcode)
    @api.model
    Return a list of dict that matches with the given barcode with the following format [{"field": field, "record": record, "extra_data": extra_data_dict)

New fields (7)
  • barcode_search_id Many2one → barcode.search
    comodel_name='barcode.search'
  • extra_data Char
  • extra_data_display Text
    compute='_compute_extra_data_display' string='Extra Data'
  • field_id Many2one → ir.model.fields
    comodel_name='ir.model.fields' readonly=True string='Field'
  • item_name Char
    readonly=True string='Item Name'
  • item_ref Integer
    readonly=True string='Item ID'
  • model_id Many2one → ir.model
    comodel_name='ir.model' readonly=True related='field_id.model_id'
Public methods (1)
  • button_view(self)
    @api.multi