GS1 Barcode API

base_gs1_barcode
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/15.0/base_gs1_barcode
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYGeneric Modules/Inventory Control
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Numérigraphe
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Numérigraphe
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, Jasmin Solanki
WEBSITE
WEBSITEhttps://github.com/OCA/stock-logistics-barcode
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:31
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
gs1_barcode_form_view gs1_barcode.form gs1_barcode form New
gs1_barcode_tree_view gs1_barcode.tree gs1_barcode tree New
view_users_form_gs1_barcode res.users.form.gs1_barcode res.users notebook Inherits base.view_users_form
Models touched (2)

New fields (7)
  • ai Char
    help='The standard Application Identifier (AI)' required=True size=14 args: 'Application Identifier'
  • data_type Selection
    default='string' required=True args: [('string', 'Any character string'), ('numeric', 'Numeric value'), ('date', 'Date')]
  • decimal Boolean
    help='Indicates whether a digit is expected before the data for this Application Identifier to indicate the position of the decimal point.' args: 'Decimal Indicator'
  • length_fixed Boolean
    default=True help='Indicates whether the length of the data for this Application Identifier is fixed or not.' args: 'Fixed-length Data'
  • length_max Integer
    default=30 help='Maximum length of the data for this Application Identifier.' required=True args: 'Maximum Data Length'
  • length_min Integer
    help='Minimum length of the data for this Application Identifier.' args: 'Minimum Data Length'
  • name Char
    required=True translate=True args: 'Description'
Public methods (1)
  • decode(self, barcode_string)
    @api.model
    Decode a GS1-128/GS1-Datamatrix string to dictionary of values with Application Identifiers as keys. Please note that the string MUST contain a <GS> character (group separator) after each variable-length value. <GS> is usually expected to be sent as ASCII character 29 but that may be configured per user. If the same Application Identifier is present several times in the string, only the its last value is returned. @type barcode_string: string @param barcode_string: GS1-128/GS1-Datamatrix string to decode @return: A dictionary of values with Application Identifiers as keys

New fields (2)
  • gs1_barcode_prefix Char
    help='The prefix that the barcode scanner will send when GS1-128 or GS1-Datamatrix codes are scanned. No prefix is expected if this fields is left empty' args: 'Prefix'
  • gs1_barcode_separator Char
    help='The characters that the barcode scanner will send when a <GS> (Group Separator) is encountered in a GS1-128 or GS1-Datamatrix code. <GS> is usually found when the data is of variable length. The ASCII character 29 will be expected by default if this field is left empty.' size=1 args: 'Group Separator'
Public methods (0)

No public methods.

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/14.0/base_gs1_barcode
VERSION
VERSION 1.1.0
CATEGORY
CATEGORYGeneric Modules/Inventory Control
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Numérigraphe
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Numérigraphe
COMMITTERS
COMMITTERSOCA Transbot, oca-travis, Weblate, OCA-git-bot, oca-ci, Alessandro Uffreduzzi, Olga Marco, fshah
WEBSITE
WEBSITEhttps://github.com/OCA/stock-logistics-barcode
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:40:51
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
gs1_barcode_form_view gs1_barcode.form gs1_barcode form New
gs1_barcode_tree_view gs1_barcode.tree gs1_barcode tree New
view_users_form_gs1_barcode res.users.form.gs1_barcode res.users notebook Inherits base.view_users_form
Models touched (3)

New fields (0)

No new fields.

Public methods (1)
  • encode_gs1(self)

New fields (7)
  • ai Char
    help='The standard Application Identifier (AI)' required=True size=14 args: 'Application Identifier'
  • data_type Selection
    default='string' required=True args: [('string', 'Any character string'), ('numeric', 'Numeric value'), ('date', 'Date')], 'Data Type'
  • decimal Boolean
    help='Indicates whether a digit is expected before the data for this Application Identifier to indicate the position of the decimal point.' args: 'Decimal Indicator'
  • length_fixed Boolean
    default=True help='Indicates whether the length of the data for this Application Identifier is fixed or not.' args: 'Fixed-length Data'
  • length_max Integer
    default=30 help='Maximum length of the data for this Application Identifier.' required=True args: 'Maximum Data Length'
  • length_min Integer
    help='Minimum length of the data for this Application Identifier.' args: 'Minimum Data Length'
  • name Char
    required=True translate=True args: 'Description'
Public methods (1)
  • decode(self, barcode_string)
    @api.model
    Decode a GS1-128/GS1-Datamatrix string to dictionary of values with Application Identifiers as keys. Please note that the string MUST contain a <GS> character (group separator) after each variable-length value. <GS> is usually expected to be sent as ASCII character 29 but that may be configured per user. If the same Application Identifier is present several times in the string, only the its last value is returned. @type barcode_string: string @param barcode_string: GS1-128/GS1-Datamatrix string to decode @return: A dictionary of values with Application Identifiers as keys

New fields (2)
  • gs1_barcode_prefix Char
    help='The prefix that the barcode scanner will send when GS1-128 or GS1-Datamatrix codes are scanned. No prefix is expected if this fields is left empty' args: 'Prefix'
  • gs1_barcode_separator Char
    help='The characters that the barcode scanner will send when a <GS> (Group Separator) is encountered in a GS1-128 or GS1-Datamatrix code. <GS> is usually found when the data is of variable length. The ASCII character 29 will be expected by default if this field is left empty.' size=1 args: 'Group Separator'
Public methods (0)

No public methods.

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/13.0/base_gs1_barcode
VERSION
VERSION 1.1.0
CATEGORY
CATEGORYGeneric Modules/Inventory Control
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Numérigraphe
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Numérigraphe
COMMITTERS
COMMITTERSPedro M. Baeza, OCA Transbot, Sergio Teruel, oca-travis, Weblate, OCA-git-bot, oca-ci, Olga Marco
WEBSITE
WEBSITEhttps://github.com/OCA/stock-logistics-barcode
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:34:10
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
gs1_barcode_form_view gs1_barcode.form gs1_barcode form New
gs1_barcode_tree_view gs1_barcode.tree gs1_barcode tree New
view_users_form_gs1_barcode res.users.form.gs1_barcode res.users notebook Inherits base.view_users_form
Models touched (3)

New fields (0)

No new fields.

Public methods (1)
  • encode_gs1(self)

New fields (7)
  • ai Char
    help='The standard Application Identifier (AI)' required=True size=14 args: 'Application Identifier'
  • data_type Selection
    default='string' required=True args: [('string', 'Any character string'), ('numeric', 'Numeric value'), ('date', 'Date')], 'Data Type'
  • decimal Boolean
    help='Indicates whether a digit is expected before the data for this Application Identifier to indicate the position of the decimal point.' args: 'Decimal Indicator'
  • length_fixed Boolean
    default=True help='Indicates whether the length of the data for this Application Identifier is fixed or not.' args: 'Fixed-length Data'
  • length_max Integer
    default=30 help='Maximum length of the data for this Application Identifier.' required=True args: 'Maximum Data Length'
  • length_min Integer
    help='Minimum length of the data for this Application Identifier.' args: 'Minimum Data Length'
  • name Char
    required=True translate=True args: 'Description'
Public methods (1)
  • decode(self, barcode_string)
    @api.model
    Decode a GS1-128/GS1-Datamatrix string to dictionary of values with Application Identifiers as keys. Please note that the string MUST contain a <GS> character (group separator) after each variable-length value. <GS> is usually expected to be sent as ASCII character 29 but that may be configured per user. If the same Application Identifier is present several times in the string, only the its last value is returned. @type barcode_string: string @param barcode_string: GS1-128/GS1-Datamatrix string to decode @return: A dictionary of values with Application Identifiers as keys

New fields (2)
  • gs1_barcode_prefix Char
    help='The prefix that the barcode scanner will send when GS1-128 or GS1-Datamatrix codes are scanned. No prefix is expected if this fields is left empty' args: 'Prefix'
  • gs1_barcode_separator Char
    help='The characters that the barcode scanner will send when a <GS> (Group Separator) is encountered in a GS1-128 or GS1-Datamatrix code. <GS> is usually found when the data is of variable length. The ASCII character 29 will be expected by default if this field is left empty.' size=1 args: 'Group Separator'
Public methods (0)

No public methods.

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/12.0/base_gs1_barcode
VERSION
VERSION 1.1.1
CATEGORY
CATEGORYGeneric Modules/Inventory Control
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Numérigraphe
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Numérigraphe
COMMITTERS
COMMITTERSDenis Roussel, Enric Tobella, OCA Transbot, oca-travis, Weblate, OCA-git-bot, Joan Sisquella
WEBSITE
WEBSITEhttps://github.com/OCA/stock-logistics-barcode
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:29:14
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
gs1_barcode_form_view gs1_barcode.form gs1_barcode form New
gs1_barcode_tree_view gs1_barcode.tree gs1_barcode tree New
view_users_form_gs1_barcode res.users.form.gs1_barcode res.users notebook Inherits base.view_users_form
Models touched (2)

New fields (7)
  • ai Char
    help='The standard Application Identifier (AI)' required=True size=14 args: 'Application Identifier'
  • data_type Selection
    default='string' oldname='type' required=True args: [('string', 'Any character string'), ('numeric', 'Numeric value'), ('date', 'Date')], 'Data Type'
  • decimal Boolean
    help='Indicates whether a digit is expected before the data for this Application Identifier to indicate the position of the decimal point.' args: 'Decimal Indicator'
  • length_fixed Boolean
    default=True help='Indicates whether the length of the data for this Application Identifier is fixed or not.' args: 'Fixed-length Data'
  • length_max Integer
    default=30 help='Maximum length of the data for this Application Identifier.' required=True args: 'Maximum Data Length'
  • length_min Integer
    help='Minimum length of the data for this Application Identifier.' args: 'Minimum Data Length'
  • name Char
    required=True translate=True args: 'Description'
Public methods (1)
  • decode(self, barcode_string)
    @api.model
    Decode a GS1-128/GS1-Datamatrix string to dictionary of values with Application Identifiers as keys. Please note that the string MUST contain a <GS> character (group separator) after each variable-length value. <GS> is usually expected to be sent as ASCII character 29 but that may be configured per user. If the same Application Identifier is present several times in the string, only the its last value is returned. @type barcode_string: string @param barcode_string: GS1-128/GS1-Datamatrix string to decode @return: A dictionary of values with Application Identifiers as keys

New fields (2)
  • gs1_barcode_prefix Char
    help='The prefix that the barcode scanner will send when GS1-128 or GS1-Datamatrix codes are scanned. No prefix is expected if this fields is left empty' args: 'Prefix'
  • gs1_barcode_separator Char
    help='The characters that the barcode scanner will send when a <GS> (Group Separator) is encountered in a GS1-128 or GS1-Datamatrix code. <GS> is usually found when the data is of variable length. The ASCII character 29 will be expected by default if this field is left empty.' size=1 args: 'Group Separator'
Public methods (0)

No public methods.

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/11.0/base_gs1_barcode
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYGeneric Modules/Inventory Control
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Numérigraphe
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Numérigraphe
COMMITTERS
COMMITTERSPedro M. Baeza, Jordi Ballester Alomar, OCA Transbot, Sergio Teruel, oca-travis, Weblate, OCA-git-bot
WEBSITE
WEBSITEhttp://numerigraphe.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:23:56
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
gs1_barcode_form_view gs1_barcode.form gs1_barcode form New
gs1_barcode_tree_view gs1_barcode.tree gs1_barcode tree New
view_users_form_gs1_barcode res.users.form.gs1_barcode res.users notebook Inherits base.view_users_form
Models touched (2)

New fields (7)
  • ai Char
    help='The standard Application Identifier (AI)' required=True size=14 args: 'Application Identifier'
  • data_type Selection
    default='string' oldname='type' required=True args: [('string', 'Any character string'), ('numeric', 'Numeric value'), ('date', 'Date')], 'Data Type'
  • decimal Boolean
    help='Indicates whether a digit is expected before the data for this Application Identifier to indicate the position of the decimal point.' args: 'Decimal Indicator'
  • length_fixed Boolean
    default=True help='Indicates whether the length of the data for this Application Identifier is fixed or not.' args: 'Fixed-length Data'
  • length_max Integer
    default=30 help='Maximum length of the data for this Application Identifier.' required=True args: 'Maximum Data Length'
  • length_min Integer
    help='Minimum length of the data for this Application Identifier.' args: 'Minimum Data Length'
  • name Char
    required=True translate=True args: 'Description'
Public methods (1)
  • decode(self, barcode_string)
    @api.model
    Decode a GS1-128/GS1-Datamatrix string to dictionary of values with Application Identifiers as keys. Please note that the string MUST contain a <GS> character (group separator) after each variable-length value. <GS> is usually expected to be sent as ASCII character 29 but that may be configured per user. If the same Application Identifier is present several times in the string, only the its last value is returned. @type barcode_string: string @param barcode_string: GS1-128/GS1-Datamatrix string to decode @return: A dictionary of values with Application Identifiers as keys

New fields (2)
  • gs1_barcode_prefix Char
    help='The prefix that the barcode scanner will send when GS1-128 or GS1-Datamatrix codes are scanned. No prefix is expected if this fields is left empty' args: 'Prefix'
  • gs1_barcode_separator Char
    help='The characters that the barcode scanner will send when a <GS> (Group Separator) is encountered in a GS1-128 or GS1-Datamatrix code. <GS> is usually found when the data is of variable length. The ASCII character 29 will be expected by default if this field is left empty.' size=1 args: 'Group Separator'
Public methods (0)

No public methods.

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/base_gs1_barcode
VERSION
VERSION 1.0
CATEGORY
CATEGORYGeneric Modules/Inventory Control
LICENSE
LICENSEGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSNumérigraphe
MAINTAINERS
MAINTAINERSNumérigraphe
COMMITTERS
COMMITTERSPedro M. Baeza, OCA Transbot
WEBSITE
WEBSITEhttp://numerigraphe.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:19:54
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - product
    - base
    - decimal_precision
    - mail
    - base_setup
    - web_kanban
    - web
    - bus
    - web_tour
    - report
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module provides an API to decoding the content of structured barcodes like GS1-128 or GS1-Datamatrix.

GS1-128 (formerly known as UCC-128, EAN 128 or UCC/EAN-128), and GS1-Datamatrix are standards for encoding item identification and logistics data.
Physically, GS1-128 is represented as a 1-dimension Code-128 barcode and GS1-Datamtrix is represented as a 2-dimensions Datamatrix barcode.

When those barcodes are read, their content can be decode into multiple values using a set of standard "Application Identifiers". For example, most pharmacy items have a GS1-Datamatrix barcode containg their GTIN, lot number and expiry date.

This module does not directly allow you to print or scan barcodes.
Instead, the focus of this module is on decoding the data contained in barcodes. To this end, it provides objects to fine-tune the Application Identifiers and
the associated data types.

Caveat Emptor: when an "Application Identifiers" has variable-length data, the barcodes must contain a special character (<GS>, group separator) but as this is not an ASCII character. Some barcdode readers will not include this character: decoding the structured data will then be impossible. Other readers will translate GS1 to ASCII character 29, but this character is not printable, and some applications may not record it. Yet other readers will let you configure how to map <GS>, which may help improve compatibility.

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
gs1_barcode_form_view gs1_barcode.form gs1_barcode form New
gs1_barcode_tree_view gs1_barcode.tree gs1_barcode tree New
view_users_form_gs1_barcode res.users.form.gs1_barcode res.users notebook Inherits base.view_users_form
Models touched (2)

New fields (0)

No new fields.

Public methods (1)
  • decode(self, cr, uid, barcode_string, context=None)
    Decode a GS1-128/GS1-Datamatrix string to dictionary of values with Application Identifiers as keys. Please note that the string MUST contain a <GS> character (group separator) after each variable-length value. <GS> is usually expected to be sent as ASCII character 29 but that may be configured per user. If the same Application Identifier is present several times in the string, only the its last value is returned. @type barcode_string: string @param barcode_string: GS1-128/GS1-Datamatrix string to decode @return: A dictionary of values with Application Identifiers as keys

New fields (0)

No new fields.

Public methods (0)

No public methods.

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/9.0/base_gs1_barcode
VERSION
VERSION 1.0
CATEGORY
CATEGORYGeneric Modules/Inventory Control
LICENSE
LICENSEGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSNumérigraphe
MAINTAINERS
MAINTAINERSNumérigraphe
COMMITTERS
COMMITTERS
WEBSITE
WEBSITEhttp://numerigraphe.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:15:19
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - product
    - base
    - decimal_precision
    - mail
    - base_setup
    - web_kanban
    - web
    - bus
    - report
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module provides an API to decoding the content of structured barcodes like GS1-128 or GS1-Datamatrix.

GS1-128 (formerly known as UCC-128, EAN 128 or UCC/EAN-128), and GS1-Datamatrix are standards for encoding item identification and logistics data.
Physically, GS1-128 is represented as a 1-dimension Code-128 barcode and GS1-Datamtrix is represented as a 2-dimensions Datamatrix barcode.

When those barcodes are read, their content can be decode into multiple values using a set of standard "Application Identifiers". For example, most pharmacy items have a GS1-Datamatrix barcode containg their GTIN, lot number and expiry date.

This module does not directly allow you to print or scan barcodes.
Instead, the focus of this module is on decoding the data contained in barcodes. To this end, it provides objects to fine-tune the Application Identifiers and
the associated data types.

Caveat Emptor: when an "Application Identifiers" has variable-length data, the barcodes must contain a special character (<GS>, group separator) but as this is not an ASCII character. Some barcdode readers will not include this character: decoding the structured data will then be impossible. Other readers will translate GS1 to ASCII character 29, but this character is not printable, and some applications may not record it. Yet other readers will let you configure how to map <GS>, which may help improve compatibility.

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
gs1_barcode_form_view gs1_barcode.form gs1_barcode form New
gs1_barcode_tree_view gs1_barcode.tree gs1_barcode tree New
view_users_form_gs1_barcode res.users.form.gs1_barcode res.users notebook Inherits base.view_users_form
Models touched (2)

New fields (0)

No new fields.

Public methods (1)
  • decode(self, cr, uid, barcode_string, context=None)
    Decode a GS1-128/GS1-Datamatrix string to dictionary of values with Application Identifiers as keys. Please note that the string MUST contain a <GS> character (group separator) after each variable-length value. <GS> is usually expected to be sent as ASCII character 29 but that may be configured per user. If the same Application Identifier is present several times in the string, only the its last value is returned. @type barcode_string: string @param barcode_string: GS1-128/GS1-Datamatrix string to decode @return: A dictionary of values with Application Identifiers as keys

New fields (0)

No new fields.

Public methods (0)

No public methods.

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/8.0/base_gs1_barcode
VERSION
VERSION 1.1.0
CATEGORY
CATEGORYGeneric Modules/Inventory Control
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Numérigraphe
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Numérigraphe
COMMITTERS
COMMITTERSStéphane Bidoul, Alexandre Fayolle, Stéphane Bidoul (ACSONE), OCA Transbot, oca-travis, Weblate
WEBSITE
WEBSITEhttp://numerigraphe.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:11:20
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - product
    - base
    - decimal_precision
    - mail
    - base_setup
    - web_kanban
    - web
    - report
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
gs1_barcode_form_view gs1_barcode.form gs1_barcode form New
gs1_barcode_tree_view gs1_barcode.tree gs1_barcode tree New
view_users_form_gs1_barcode res.users.form.gs1_barcode res.users notebook Inherits base.view_users_form
Models touched (2)

New fields (7)
  • ai Char
    help='The standard Application Identifier (AI)' required=True size=14 args: 'Application Identifier'
  • data_type Selection
    default='string' oldname='type' required=True args: [('string', 'Any character string'), ('numeric', 'Numeric value'), ('date', 'Date')], 'Data Type'
  • decimal Boolean
    default=False help='Indicates whether a digit is expected before the data for this Application Identifier to indicate the position of the decimal point.' args: 'Decimal Indicator'
  • length_fixed Boolean
    default=True help='Indicates whether the length of the data for this Application Identifier is fixed or not.' args: 'Fixed-length Data'
  • length_max Integer
    default=30 help='Maximum length of the data for this Application Identifier.' required=True args: 'Maximum Data Length'
  • length_min Integer
    help='Minimum length of the data for this Application Identifier.' args: 'Minimum Data Length'
  • name Char
    required=True translate=True args: 'Description'
Public methods (1)
  • decode(self, barcode_string)
    @api.model
    Decode a GS1-128/GS1-Datamatrix string to dictionary of values with Application Identifiers as keys. Please note that the string MUST contain a <GS> character (group separator) after each variable-length value. <GS> is usually expected to be sent as ASCII character 29 but that may be configured per user. If the same Application Identifier is present several times in the string, only the its last value is returned. @type barcode_string: string @param barcode_string: GS1-128/GS1-Datamatrix string to decode @return: A dictionary of values with Application Identifiers as keys

New fields (2)
  • gs1_barcode_prefix Char
    help='The prefix that the barcode scanner will send when GS1-128 or GS1-Datamatrix codes are scanned. No prefix is expected if this fields is left empty' args: 'Prefix'
  • gs1_barcode_separator Char
    help='The characters that the barcode scanner will send when a <GS> (Group Separator) is encountered in a GS1-128 or GS1-Datamatrix code. <GS> is usually found when the data is of variable length. The ASCII character 29 will be expected by default if this field is left empty.' size=1 args: 'Group Separator'
Public methods (0)

No public methods.

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/7.0/base_gs1_barcode
VERSION
VERSION 1.0
CATEGORY
CATEGORYHidden
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSNumérigraphe
MAINTAINERS
MAINTAINERSNumérigraphe
COMMITTERS
COMMITTERSAlexandre Fayolle, Joel Grand-Guillaume, Stéphane Bidoul (ACSONE), unknown, OCA Transbot, Lionel Sausin (Numérigraphe)
WEBSITE
WEBSITEhttp://numerigraphe.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:07:13
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - product
    - base
    - process
    - web
    - decimal_precision
    - mail
    - base_setup
    - web_kanban
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
API for decoding the content of structured barcodes GS1-128/Datamatrix
======================================================================

GS1-128 (formerly known as UCC-128, EAN 128 or UCC/EAN-128), and GS1-Datamatrix
are standards for encoding item identification and logistics data.
Physically, GS1-128 is represented as a 1-dimension Code-128 barcode and
GS1-Datamtrix is represented as a 2-dimensions Datamatrix barcode.

When those barcodes are read, their content can be decode into multiple values
using a set of standard "Application Identifiers". For example, most pharmacy
items have a GS1-Datamatrix barcode containg their GTIN, lot number and
expiry date.

This module does not directly allow you to print or scan barcodes.
Instead, the focus of this module is on decoding the data contained in
barcodes. To this end, it provides objects to fine-tune the Application
Identifiers and the associated data types.

Caveat Emptor: when an "Application Identifiers" has variable-length data,
the barcodes must contain a special character (<GS>, group separator)
but as this is not an ASCII character. Some barcdode readers will not include
this character: decoding the structured data will then be impossible. Other
readers will translate GS1 to ASCII character 29, but this character is not
printable, and some applications may not record it. Yet other readers will
let you configure how to map <GS>, which may help improve compatibility.

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
gs1_barcode_form_view gs1_barcode.form gs1_barcode form New
gs1_barcode_tree_view gs1_barcode.tree gs1_barcode tree New
view_users_form_gs1_barcode res.users.form.gs1_barcode res.users notebook Inherits base.view_users_form
Models touched (2)

New fields (0)

No new fields.

Public methods (1)
  • decode(self, cr, uid, barcode_string, context=None)
    Decode a GS1-128/GS1-Datamatrix string to dictionary of values with Application Identifiers as keys. Please note that the string MUST contain a <GS> character (Group Separator) after each variable-length value. <GS> is usually expected to be sent as ASCII character 29 but that may be configured per user. If the same Application Identifier is present several times in the string, only the its last value is returned. @type barcode_string: string @param barcode_string: GS1-128/GS1-Datamatrix string to decode @return: A dictionary of values with Application Identifiers as keys

New fields (0)

No new fields.

Public methods (0)

No public methods.

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/6.1/base_gs1_barcode
VERSION
VERSION 1.0
CATEGORY
CATEGORYGeneric Modules/Inventory Control
LICENSE
LICENSEGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSNumérigraphe
MAINTAINERS
MAINTAINERSNumérigraphe
COMMITTERS
COMMITTERSNumerigraphe - Lionel Sausin, Guewen Baconnier
WEBSITE
WEBSITEhttp://numerigraphe.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:04:05
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - product
    - base
    - process
    - decimal_precision
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module provides an API to decoding the content of structured barcodes like GS1-128 or GS1-Datamatrix.

GS1-128 (formerly known as UCC-128, EAN 128 or UCC/EAN-128), and GS1-Datamatrix are standards for encoding item identification and logistics data.
Physically, GS1-128 is represented as a 1-dimension Code-128 barcode and GS1-Datamtrix is represented as a 2-dimensions Datamatrix barcode.

When those barcodes are read, their content can be decode into multiple values using a set of standard "Application Identifiers". For example, most pharmacy items have a GS1-Datamatrix barcode containg their GTIN, lot number and expiry date.

This module does not directly allow you to print or scan barcodes.
Instead, the focus of this module is on decoding the data contained in barcodes. To this end, it provides objects to fine-tune the Application Identifiers and
the associated data types.

Caveat Emptor: when an "Application Identifiers" has variable-length data, the barcodes must contain a special character (<GS>, group separator) but as this is not an ASCII character. Some barcdode readers will not include this character: decoding the structured data will then be impossible. Other readers will translate GS1 to ASCII character 29, but this character is not printable, and some applications may not record it. Yet other readers will let you configure how to map <GS>, which may help improve compatibility.

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
gs1_barcode_form_view gs1_barcode.form gs1_barcode form New
gs1_barcode_tree_view gs1_barcode.tree gs1_barcode tree New
view_users_form_gs1_barcode res.users.form.gs1_barcode res.users notebook Inherits base.view_users_form
Models touched (0)

No models found for this module.