You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.1 KiB

  1. odoo.define('beesdoo_shift.barcode_scanner_focus', function (require) {
  2. "use strict";
  3. var core = require('web.core');
  4. var FormViewBarcodeHandler = require('barcodes.FormViewBarcodeHandler');
  5. var BarcodeHandlerUnfocus = FormViewBarcodeHandler.extend({
  6. _set_quantity_listener: function(event) {
  7. console.log("TEST");
  8. this.super();
  9. },
  10. // Method is not called when a field is focus.
  11. on_barcode_scanned: function(barcode) {
  12. console.log("method called");
  13. this._super(barcode);
  14. }
  15. });
  16. core.form_widget_registry.add('barcode_handler_unfocus', BarcodeHandlerUnfocus);
  17. return BarcodeHandlerUnfocus;
  18. /*
  19. var Widget = require('web.Widget');
  20. var BarcodeHandlerUnfocus = Widget.extend({
  21. events: {
  22. 'click .oe_stat_button': 'function_test',
  23. }
  24. function_test: function (){
  25. console.log("test handler")
  26. });
  27. });
  28. core.form_widget_registry.add('barcode_handler_unfocus', BarcodeHandlerUnfocus);
  29. return BarcodeHandlerUnfocus;*/
  30. });