Skip to main content

Add an action to scan

Project description

Odoo Community Association

Web Ir Actions Client Scan

Beta License: LGPL-3 OCA/stock-logistics-barcode Translate me on Weblate Try me on Runboat

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.

Table of contents

Usage

You 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="&quot;{ 'method': 'example_method' }&quot;"/>
</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):
    pass

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • Tecnativa

Contributors

  • Tecnativa:

    • Juan Carlos Oñate

    • Víctor Martínez

    • Carlos Roca

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

Current maintainer:

CarlosRoca13

This module is part of the OCA/stock-logistics-barcode project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file odoo_addon_web_ir_actions_client_scan-18.0.1.0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for odoo_addon_web_ir_actions_client_scan-18.0.1.0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a5aca4f19e0b430a0b573dd3288c821ccea44feea721c4e9f517f8bdc122c3bc
MD5 3e4d072e57c09022996d224692e328b5
BLAKE2b-256 addf4353eba1743a4fbbae6f7a3fce1bf015c0e59c8ee5cc0b63a216f03e4ccb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page