For a model to use it, it must : - Inherit barcodes.barcode_events_mixin and override on_barcode_scanned(self, barcode) - Add <field name=barcode_scanned widget=barcode_handler/> to each form view that should listen to barcode events and trigger on_barcode_scanned. The method on_barcode_scanned works just like an onchange.
6 lines
56 B
Python
6 lines
56 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
import barcodes
|
|
|
|
import models
|