summaryrefslogtreecommitdiff
path: root/addons/barcodes/views
diff options
context:
space:
mode:
authorArthur Maniet <arthurmaniet@me.com>2015-09-03 11:17:45 +0200
committerSimon Lejeune <sle@openerp.com>2015-09-03 11:23:38 +0200
commitcdb30b507ae7d1cf7205e78e67f693de17bb90d3 (patch)
tree427954027107802ad2fc05f8960a2984ad2add34 /addons/barcodes/views
parent27e237346d686e6a24e3865cb0877ab1ef43078a (diff)
[ADD] stock_barcode: field widget with barcodes scan + manual input
Barcodes are detected by catching keypresses. When a keypress is not part of a barcode, it is 'released' by forging a keypress event. For security reasons, a non-native keypress doesn't trigger the native input mechanism. So in order to make both barcode-scanning and manual keypresses work in a field, it is necessary to have a handler listen to the 'false' keypresses and simulate the native input behaviour.
Diffstat (limited to 'addons/barcodes/views')
-rw-r--r--addons/barcodes/views/templates.xml1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/barcodes/views/templates.xml b/addons/barcodes/views/templates.xml
index 2fcab2ea6db..16ace99c063 100644
--- a/addons/barcodes/views/templates.xml
+++ b/addons/barcodes/views/templates.xml
@@ -9,6 +9,7 @@
<script type="text/javascript" src="/barcodes/static/src/js/barcode_handler_mixin.js"></script>
<script type="text/javascript" src="/barcodes/static/src/js/form_view_barcode_handler.js"></script>
<script type="text/javascript" src="/barcodes/static/src/js/inherited_form_widget_button.js"></script>
+ <script type="text/javascript" src="/barcodes/static/src/js/field_float_scannable.js"></script>
</xpath>
</template>