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.4-py3-none-any.whl.

File metadata

File hashes

Hashes for odoo_addon_web_ir_actions_client_scan-18.0.1.0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fdc5fea584083c0d2eca3fe0bb8f7a08009903429bbedaeee4f86201d6316565
MD5 ffc58dc2fc426328c7f2971d93bcdbfa
BLAKE2b-256 320b156c2587c2b8fc29d2450849f444cf00b892fd682f7d0908e67b4e8fd862

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