diff options
| author | Arthur Maniet <arthurmaniet@me.com> | 2015-07-08 08:08:25 +0200 |
|---|---|---|
| committer | Arthur Maniet <arthurmaniet@me.com> | 2015-09-01 13:25:52 +0200 |
| commit | 2df4060c776c7a6a946f2b7a164ff7bbbe5e854a (patch) | |
| tree | 21d8c78356237dce5ed7575964fc3142cd29abb5 /addons/barcodes/models/__init__.py | |
| parent | c1cc4b830bc2fd2b4cd01ff37b250d98e9dacb13 (diff) | |
[ADD] barcodes: onchange-like mechanism to react to scans in form view
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.
Diffstat (limited to 'addons/barcodes/models/__init__.py')
| -rw-r--r-- | addons/barcodes/models/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/barcodes/models/__init__.py b/addons/barcodes/models/__init__.py new file mode 100644 index 00000000000..5c31ffd4a98 --- /dev/null +++ b/addons/barcodes/models/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +import barcode_events_mixin |
