Stock Scanner
stock_scanner · OCA/stock-logistics-barcode
OCA/stock-logistics-workflow 8.0 → OCA/stock-logistics-barcode 9.0–12.0
-
Security5/252 grave, 1 minor
-
Activity0/25Last human commit 43 months ago
-
Required by5/250 modules depend on it
-
Maturity25/25In 5 Odoo series since 8.0
Heuristic over the facts below, not an audit · How it's computed
Security warnings
scanner_hardware_step_history_user— ACL grants write/create/unlink on 'stock_scanner.model_scanner_hardware_step_history' to every user (portal/public included): no group is set. Verify record rules and test access as an unrelated public/portal user. CWE-732. acl-global-write · sourcescanner_hardware_user— ACL grants write on 'stock_scanner.model_scanner_hardware' to every user (portal/public included): no group is set. Verify record rules and test access as an unrelated public/portal user. CWE-732. acl-global-write · source
Found by automated static analysis: these patterns are usually risky, but only a manual review of the module can confirm a real issue. Methodology
Migration considerations
ScannerHardware— Migrating to 13.0: `@api.multi`/`@api.one` were removed (multi is the default): drop them, looping over `self` where `@api.one` was used. (10 methods) migration-api-multi-one · sourceScannerScenario— Migrating to 13.0: `@api.multi`/`@api.one` were removed (multi is the default): drop them, looping over `self` where `@api.one` was used. (1 methods) migration-api-multi-one · sourcehardware_reset_user_id_on_timeout— Migrating to 18.0: `ir.cron` lost `numbercall`/`doall`: remove them from the record, data loading fails on unknown fields. migration-cron-numbercall · sourceres_config_settings_view_form— Migrating to 17.0: `attrs=`/`states=` are rejected in views: convert them to Python expressions in `invisible`/`readonly`/`required`, keeping the original AND/OR logic. migration-view-attrs-states · sourceview_scanner_hardware_tree— Migrating to 18.0: the `tree` view type was renamed to `list` (`<list>` roots, `view_mode`). migration-view-tree-tag · sourceview_scanner_scenario_form— Migrating to 17.0: `attrs=`/`states=` are rejected in views: convert them to Python expressions in `invisible`/`readonly`/`required`, keeping the original AND/OR logic. migration-view-attrs-states · sourceview_scanner_scenario_step_tree— Migrating to 18.0: the `tree` view type was renamed to `list` (`<list>` roots, `view_mode`). migration-view-tree-tag · sourceview_scanner_scenario_transition_tree— Migrating to 18.0: the `tree` view type was renamed to `list` (`<list>` roots, `view_mode`). migration-view-tree-tag · sourceview_scanner_scenario_tree— Migrating to 18.0: the `tree` view type was renamed to `list` (`<list>` roots, `view_mode`). migration-view-tree-tag · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 13
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
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
No new fields.
Public methods (0)No public methods.
-
is_login_enabledBooleanargs: 'Login/logout scenarii enabled' -
session_timeout_delayIntegerargs: 'Session validity in seconds'
-
get_values(self) -
set_values(self)
-
base_bg_colorSelectiondefault='blue'help='Default color for the background.'required=Trueselection='_colors_get'string='Base - Background Color' -
base_fg_colorSelectiondefault='white'help='Default color for the text.'required=Trueselection='_colors_get'string='Base - Text Color' -
codeCharhelp='Code of this hardware.'required=Truestring='Code' -
error_bg_colorSelectiondefault='red'help='Color for the error background.'required=Trueselection='_colors_get'string='Error - Background Color' -
error_fg_colorSelectiondefault='yellow'help='Color for the error text.'required=Trueselection='_colors_get'string='Error - Text Color' -
info_bg_colorSelectiondefault='blue'help='Color for the info background.'required=Trueselection='_colors_get'string='Info - Background Color' -
info_fg_colorSelectiondefault='yellow'help='Color for the info text.'required=Trueselection='_colors_get'string='Info - Text Color' -
last_call_dtDatetimehelp='Date and time of the last call to the system done by the scanner.'string='Last call' -
log_enabledBooleandefault=Falsehelp='Enable logging messages from scenarios.'string='Log enabled' -
nameCharhelp='Name of the hardware.'required=Truestring='Name' -
reference_documentIntegerdefault=0help='ID of the reference document.'readonly=Truerequired=Falsestring='Reference' -
scenario_idMany2one → scanner.scenariocomodel_name='scanner.scenario'default=Falsehelp='Scenario used for this hardware.'ondelete='restrict'readonly=Truerequired=Falsestring='Scenario' -
screen_heightIntegerdefault=4help="Height of the terminal's screen."required=Falsestring='Screen Height' -
screen_widthIntegerdefault=20help="Width of the terminal's screen."required=Falsestring='Screen Width' -
step_history_idsOne2many → scanner.hardware.step.historycomodel_name='scanner.hardware.step.history'help='History of all steps executed by this hardware during the current scenario.'inverse_name='hardware_id'readonly=Truestring='Steps History' -
step_idMany2one → scanner.scenario.stepcomodel_name='scanner.scenario.step'default=Falsehelp='Current step for this hardware.'ondelete='restrict'readonly=Truerequired=Falsestring='Current Step' -
tmp_valuesSerializedreadonly=True -
tmp_values_displayHtmlcompute='_compute_tmp_values_display'help='Debug tmp values' -
user_idMany2one → res.userscomodel_name='res.users'help='Allow to define an other user for execute all scenarios with that scanner instead of default user.'ondelete='restrict'required=Falsestring='User' -
warehouse_idMany2one → stock.warehousecomodel_name='stock.warehouse'help='Warehouse where is located this hardware.'ondelete='restrict'required=Truestring='Warehouse'
-
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.modelThis method is called by the barcode reader, -
scanner_check(self, terminal_number)@api.model -
scanner_end(self, numterm=None)@api.modelEnd 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
-
hardware_idMany2one → scanner.hardwarecomodel_name='scanner.hardware'help='Hardware linked to this history line.'required=Truestring='Hardware' -
messageCharhelp='Message sent during execution of the step.'string='Message' -
step_idMany2one → scanner.scenario.stepcomodel_name='scanner.scenario.step'help='Step executed during this history line.'string='Step' -
transition_idMany2one → scanner.scenario.transitioncomodel_name='scanner.scenario.transition'help='Transition executed during this history line.'string='Transition'
No public methods.
-
activeBooleandefault=Truehelp='If check, this object is always available.'string='Active' -
child_idsOne2many → scanner.scenariocomodel_name='scanner.scenario'inverse_name='parent_id'string='Subordinates' -
company_idMany2one → res.companycomodel_name='res.company'default=<expr>help='Company to be used on this scenario.'ondelete='restrict'required=Truestring='Company' -
group_idsMany2many → res.groupscolumn1='scenario_id'column2='group_id'comodel_name='res.groups'default=<expr>relation='scanner_scenario_res_groups_rel'string='Allowed Groups' -
model_idMany2one → ir.modelcomodel_name='ir.model'help='Model used for this scenario.'ondelete='restrict'required=Falsestring='Model' -
nameCharhelp='Appear on barcode reader screen.'required=Truestring='Name'translate=True -
notesTextdefault='Notes\n\n\n'help='Store different notes, date and title for modification, etc...'string='Notes' -
parent_idMany2one → scanner.scenariocomodel_name='scanner.scenario'help='Parent scenario, used to create menus.'ondelete='restrict'required=Falsestring='Parent' -
sequenceIntegerdefault=0help='Sequence order.'required=Falsestring='Sequence' -
step_idsOne2many → scanner.scenario.stepcomodel_name='scanner.scenario.step'help='Step of the current running scenario.'inverse_name='scenario_id'ondelete='cascade'string='Scenario' -
typeSelectiondefault='scenario'help='Defines if this scenario is a menu or an executable scenario.'required=Trueselection='_type_get'string='Type' -
user_idsMany2many → res.userscolumn1='scenario_id'column2='user_id'comodel_name='res.users'relation='scanner_scenario_res_users_rel'string='Allowed Users' -
warehouse_idsMany2many → stock.warehousecolumn1='scenario_id'column2='warehouse_id'comodel_name='stock.warehouse'help='Warehouses for this scenario.'relation='scanner_scenario_warehouse_rel'string='Warehouses'
-
copy(self, default=None)@api.multi
-
in_transition_idsOne2many → scanner.scenario.transitioncomodel_name='scanner.scenario.transition'help='Transitions which goes to the next step.'inverse_name='to_id'ondelete='cascade'string='Incoming transitions' -
nameCharhelp='Name of the step.'required=Falsestring='Name' -
no_backBooleandefault=Falsehelp='Check this to prevent returning back this step.'string='No back' -
out_transition_idsOne2many → scanner.scenario.transitioncomodel_name='scanner.scenario.transition'help='Transitions which goes to this step.'inverse_name='from_id'ondelete='cascade'string='Outgoing transitions' -
python_codeTextdefault=PYTHON_CODE_DEFAULThelp='Python code to execute.'string='Python code' -
scenario_idMany2one → scanner.scenariocomodel_name='scanner.scenario'help='Scenario for this step.'ondelete='cascade'required=Truestring='Scenario' -
scenario_notesTextreadonly=Falserelated='scenario_id.notes' -
step_backBooleandefault=Falsehelp='Check this to stop at this step when returning back.'string='Step back' -
step_startBooleandefault=Falsehelp='Check this if this is the first step of the scenario.'string='Step start' -
step_stopBooleandefault=Falsehelp='Check this if this is the last step of the scenario.'string='Step stop'
No public methods.
-
conditionChardefault='True'help='The transition is followed only if this condition is evaluated as True.'required=Truestring='Condition' -
from_idMany2one → scanner.scenario.stepcomodel_name='scanner.scenario.step'help='Step which launches this transition.'ondelete='cascade'required=Truestring='From' -
nameCharhelp='Name of the transition.'required=Truestring='Name' -
scenario_idMany2one → scanner.scenariocomodel_name='scanner.scenario'ondelete='cascade'readonly=Truerelated='from_id.scenario_id'required=Falsestore=Truestring='Scenario' -
sequenceIntegerdefault=0help='Sequence order.'required=Falsestring='Sequence' -
to_idMany2one → scanner.scenario.stepcomodel_name='scanner.scenario.step'help='Step which is reached by this transition.'ondelete='cascade'required=Truestring='To' -
tracerChardefault=Falsehelp='Used to determine fron which transition we arrive to the destination step.'required=Falsestring='Tracer' -
transition_typeSelectiondefault='keyboard'help='Type of transition.'selection='_transition_type_get'string='Transition Type'
No public methods.
Loading…
Loading…
Loading…
Loading…