Repository
OCA/stock-logistics-barcode · module folder · Try on Runboat
Module version
1.0.3
Category
Generic Modules/Inventory Control
Folder size
1.26 MB
License
AGPL-3
Application
Yes
Auto-installable
No
Website
https://github.com/OCA/stock-logistics-barcode
Last tracking update
2026-08-07 07:31:57
Authors
ACSONE SA/NV, Odoo Community Association (OCA), Subteno IT
Maintainers
ACSONE SA/NV, Odoo Community Association (OCA), Subteno IT
Committers
Denis Roussel, Florent de Labarre, Weblate, OCA Transbot, OCA-git-bot, oca-travis, oca-ci
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None
Description

Code Analysis

Views touched (13)
XML IDNameModelTypeStatus
res_config_settings_view_form res.config.settings form Inherits stock.res_config_settings_view_form
view_scanner_hardware_form scanner.hardware.form scanner.hardware form New
view_scanner_hardware_tree scanner.hardware.tree scanner.hardware tree New
view_scanner_scenario_diagram scanner.scenario.diagram scanner.scenario diagram New
view_scanner_scenario_form scanner.scenario.form scanner.scenario form New
view_scanner_scenario_search scanner.scenario.search scanner.scenario search New
view_scanner_scenario_step_form scanner.scenario.step.form scanner.scenario.step form New
view_scanner_scenario_step_search scanner.scenario.step.search scanner.scenario.step search New
view_scanner_scenario_step_tree scanner.scenario.step.tree scanner.scenario.step tree New
view_scanner_scenario_transition_form scanner.scenario.transition.form scanner.scenario.transition form New
view_scanner_scenario_transition_search scanner.scenario.transition.search scanner.scenario.transition search New
view_scanner_scenario_transition_tree scanner.scenario.transition.tree scanner.scenario.transition tree New
view_scanner_scenario_tree scanner.scenario.tree scanner.scenario tree New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (7)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • is_login_enabled Boolean
    args: 'Login/logout scenarii enabled'
  • session_timeout_delay Integer
    args: 'Session validity in seconds'
Public methods (2)
  • get_values(self)
  • set_values(self)

New fields (20)
  • base_bg_color Selection
    default='blue' help='Default color for the background.' required=True selection='_colors_get' string='Base - Background Color'
  • base_fg_color Selection
    default='white' help='Default color for the text.' required=True selection='_colors_get' string='Base - Text Color'
  • code Char
    help='Code of this hardware.' required=True string='Code'
  • error_bg_color Selection
    default='red' help='Color for the error background.' required=True selection='_colors_get' string='Error - Background Color'
  • error_fg_color Selection
    default='yellow' help='Color for the error text.' required=True selection='_colors_get' string='Error - Text Color'
  • info_bg_color Selection
    default='blue' help='Color for the info background.' required=True selection='_colors_get' string='Info - Background Color'
  • info_fg_color Selection
    default='yellow' help='Color for the info text.' required=True selection='_colors_get' string='Info - Text Color'
  • last_call_dt Datetime
    help='Date and time of the last call to the system done by the scanner.' string='Last call'
  • log_enabled Boolean
    default=False help='Enable logging messages from scenarios.' string='Log enabled'
  • name Char
    help='Name of the hardware.' required=True string='Name'
  • reference_document Integer
    default=0 help='ID of the reference document.' readonly=True required=False string='Reference'
  • scenario_id Many2one → scanner.scenario
    comodel_name='scanner.scenario' default=False help='Scenario used for this hardware.' ondelete='restrict' readonly=True required=False string='Scenario'
  • screen_height Integer
    default=4 help="Height of the terminal's screen." required=False string='Screen Height'
  • screen_width Integer
    default=20 help="Width of the terminal's screen." required=False string='Screen Width'
  • step_history_ids One2many → scanner.hardware.step.history
    comodel_name='scanner.hardware.step.history' help='History of all steps executed by this hardware during the current scenario.' inverse_name='hardware_id' readonly=True string='Steps History'
  • step_id Many2one → scanner.scenario.step
    comodel_name='scanner.scenario.step' default=False help='Current step for this hardware.' ondelete='restrict' readonly=True required=False string='Current Step'
  • tmp_values Serialized
    readonly=True
  • tmp_values_display Html
    compute='_compute_tmp_values_display' help='Debug tmp values'
  • user_id Many2one → res.users
    comodel_name='res.users' help='Allow to define an other user for execute all scenarios with that scanner instead of default user.' ondelete='restrict' required=False string='User'
  • warehouse_id Many2one → stock.warehouse
    comodel_name='stock.warehouse' help='Warehouse where is located this hardware.' ondelete='restrict' required=True string='Warehouse'
Public methods (23)
  • check_credentials(self, login, password)
    @api.model
  • clean_tmp_values(self, items)
    @api.multi
  • empty_scanner_values(self)
    This method empty all temporary values, scenario, step and reference_document Because if we want reset term when error we must use sql query, it is bad in production
  • get_tmp_value(self, key_name, default=None)
    @api.multi
  • json_tmp_val1(self)
    @property@api.multi
  • json_tmp_val1(self, value)
    @json_tmp_val1.setter
  • json_tmp_val2(self)
    @property@api.multi
  • json_tmp_val2(self, value)
    @json_tmp_val2.setter
  • json_tmp_val3(self)
    @property@api.multi
  • json_tmp_val3(self, value)
    @json_tmp_val3.setter
  • json_tmp_val4(self)
    @property@api.multi
  • json_tmp_val4(self, value)
    @json_tmp_val4.setter
  • json_tmp_val5(self)
    @property@api.multi
  • json_tmp_val5(self, value)
    @json_tmp_val5.setter
  • log(self, log_message)
  • login(self, login, password)
    This method assign the uid associated to login as current user of the hardware. The method MUST be called on the last step since the login scenario will no more be visible by the current user once it will be assigned this one
  • logout(self)
  • scanner_call(self, terminal_number, action, message=False, transition_type='keyboard')
    @api.model
    This method is called by the barcode reader,
  • scanner_check(self, terminal_number)
    @api.model
  • scanner_end(self, numterm=None)
    @api.model
    End the end barcode is read, we execute this step
  • set_tmp_value(self, key_name, value)
    @api.multi
  • timeout_session(self)
    @api.model
  • update_tmp_values(self, values)
    @api.multi

New fields (4)
  • hardware_id Many2one → scanner.hardware
    comodel_name='scanner.hardware' help='Hardware linked to this history line.' required=True string='Hardware'
  • message Char
    help='Message sent during execution of the step.' string='Message'
  • step_id Many2one → scanner.scenario.step
    comodel_name='scanner.scenario.step' help='Step executed during this history line.' string='Step'
  • transition_id Many2one → scanner.scenario.transition
    comodel_name='scanner.scenario.transition' help='Transition executed during this history line.' string='Transition'
Public methods (0)

No public methods.

New fields (13)
  • active Boolean
    default=True help='If check, this object is always available.' string='Active'
  • child_ids One2many → scanner.scenario
    comodel_name='scanner.scenario' inverse_name='parent_id' string='Subordinates'
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> help='Company to be used on this scenario.' ondelete='restrict' required=True string='Company'
  • group_ids Many2many → res.groups
    column1='scenario_id' column2='group_id' comodel_name='res.groups' default=<expr> relation='scanner_scenario_res_groups_rel' string='Allowed Groups'
  • model_id Many2one → ir.model
    comodel_name='ir.model' help='Model used for this scenario.' ondelete='restrict' required=False string='Model'
  • name Char
    help='Appear on barcode reader screen.' required=True string='Name' translate=True
  • notes Text
    default='Notes\n\n\n' help='Store different notes, date and title for modification, etc...' string='Notes'
  • parent_id Many2one → scanner.scenario
    comodel_name='scanner.scenario' help='Parent scenario, used to create menus.' ondelete='restrict' required=False string='Parent'
  • sequence Integer
    default=0 help='Sequence order.' required=False string='Sequence'
  • step_ids One2many → scanner.scenario.step
    comodel_name='scanner.scenario.step' help='Step of the current running scenario.' inverse_name='scenario_id' ondelete='cascade' string='Scenario'
  • type Selection
    default='scenario' help='Defines if this scenario is a menu or an executable scenario.' required=True selection='_type_get' string='Type'
  • user_ids Many2many → res.users
    column1='scenario_id' column2='user_id' comodel_name='res.users' relation='scanner_scenario_res_users_rel' string='Allowed Users'
  • warehouse_ids Many2many → stock.warehouse
    column1='scenario_id' column2='warehouse_id' comodel_name='stock.warehouse' help='Warehouses for this scenario.' relation='scanner_scenario_warehouse_rel' string='Warehouses'
Public methods (1)
  • copy(self, default=None)
    @api.multi

New fields (10)
  • in_transition_ids One2many → scanner.scenario.transition
    comodel_name='scanner.scenario.transition' help='Transitions which goes to the next step.' inverse_name='to_id' ondelete='cascade' string='Incoming transitions'
  • name Char
    help='Name of the step.' required=False string='Name'
  • no_back Boolean
    default=False help='Check this to prevent returning back this step.' string='No back'
  • out_transition_ids One2many → scanner.scenario.transition
    comodel_name='scanner.scenario.transition' help='Transitions which goes to this step.' inverse_name='from_id' ondelete='cascade' string='Outgoing transitions'
  • python_code Text
    default=PYTHON_CODE_DEFAULT help='Python code to execute.' string='Python code'
  • scenario_id Many2one → scanner.scenario
    comodel_name='scanner.scenario' help='Scenario for this step.' ondelete='cascade' required=True string='Scenario'
  • scenario_notes Text
    readonly=False related='scenario_id.notes'
  • step_back Boolean
    default=False help='Check this to stop at this step when returning back.' string='Step back'
  • step_start Boolean
    default=False help='Check this if this is the first step of the scenario.' string='Step start'
  • step_stop Boolean
    default=False help='Check this if this is the last step of the scenario.' string='Step stop'
Public methods (0)

No public methods.

New fields (8)
  • condition Char
    default='True' help='The transition is followed only if this condition is evaluated as True.' required=True string='Condition'
  • from_id Many2one → scanner.scenario.step
    comodel_name='scanner.scenario.step' help='Step which launches this transition.' ondelete='cascade' required=True string='From'
  • name Char
    help='Name of the transition.' required=True string='Name'
  • scenario_id Many2one → scanner.scenario
    comodel_name='scanner.scenario' ondelete='cascade' readonly=True related='from_id.scenario_id' required=False store=True string='Scenario'
  • sequence Integer
    default=0 help='Sequence order.' required=False string='Sequence'
  • to_id Many2one → scanner.scenario.step
    comodel_name='scanner.scenario.step' help='Step which is reached by this transition.' ondelete='cascade' required=True string='To'
  • tracer Char
    default=False help='Used to determine fron which transition we arrive to the destination step.' required=False string='Tracer'
  • transition_type Selection
    default='keyboard' help='Type of transition.' selection='_transition_type_get' string='Transition Type'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…