Web Ir Actions Client Scan
This Odoo module adds a custom barcode scanning action within the web backend. Its purpose is to allow the user to scan a code (for example, using a camera or a scanner) and call a server side method defined in the action params via rpc.
auto_awesome What this module does
AI-generated from the code · Odoo 18.0Adds a barcode scanning screen to Odoo that opens the camera or scanner, sends the scanned code to a server method, and shows the result or an error message.
This module adds a new client action called web_ir_actions_client_scan.scan that can be used from any Odoo action. When the action is opened, Odoo immediately starts the barcode scanner (camera or hardware scanner) and shows a simple screen with the text "Opening scanner…" and a Back button.
After a code is scanned, the value is sent to a server-side method defined in the action settings. The method is called on the model set in the action, together with the scanned value and the action context.
Depending on what the server returns, the module reacts automatically: - If the result contains an error, an error sound is played, the error message is shown as a red notification, and the screen closes. - If the result contains an action, a notification sound is played and that action is opened. - If the result is anything else, an error sound is played and the message "Unexpected server response" is shown. - If nothing was scanned, a warning "Nothing scanned" is shown. - If the scanner is not available or fails, an error message is shown.
In all error or empty cases, the user is returned to the previous screen. The module depends on the standard barcodes module and only adds web interface behaviour; it does not create new database models or menus.
Depends on
Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 1 confirmed, 8 with no information of 9 versions.
Sources · Odoo 18.0
Confirmed on 2026-11-03 in branch 18.0 of OCA/stock-logistics-barcode.
terminal Installation and usage
OCA documentation · Odoo 18.0Usage
Source · Odoo 18.0You can integrate the scanner into your module by defining a client action:
<record id="action_scan_example" model="ir.actions.client">
<field name="name">Scan Code</field>
<field name="tag">web_ir_actions_client_scan.scan</field>
<field name="res_model">example_model</field>
<field name="params" eval=""{ 'method': 'example_method' }""/>
</record>The parameter is as follows:
- method: Used to determine which method of the res_model will be executed during scanning pocess.
Then trigger it from a button:
<button name="%(action_scan_example)d"
type="action"
string="Scan Code"
class="btn-primary"/>The action opens a popup where you will have the option to scan a barcode. After completing the scan, the method defined in the action parameters will be executed.
The signature of the method should be like in next code:
@api.model
def example_method(self, barcode):
passNo verified information in OCA: Installation, Configuration.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.