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/__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/__init__.py')
| -rw-r--r-- | addons/barcodes/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/barcodes/__init__.py b/addons/barcodes/__init__.py index 5bea30ad78f..42a4cc552ac 100644 --- a/addons/barcodes/__init__.py +++ b/addons/barcodes/__init__.py @@ -1 +1,5 @@ +# -*- coding: utf-8 -*- + import barcodes + +import models |
