Browse Source

[REM] beesdoo_shift_assets

pull/143/head
Elouan Le Bars 5 years ago
parent
commit
061b30d544
  1. 1
      beesdoo_shift/__openerp__.py
  2. 35
      beesdoo_shift/static/src/js/barcode_scanner_focus.js
  3. 10
      beesdoo_shift/views/beesdoo_shift_assets.xml

1
beesdoo_shift/__openerp__.py

@ -23,7 +23,6 @@
"data/mail_template.xml",
"security/group.xml",
"security/ir.model.access.csv",
"views/beesdoo_shift_assets.xml",
"views/task_template.xml",
"views/res_config_view.xml",
"views/task.xml",

35
beesdoo_shift/static/src/js/barcode_scanner_focus.js

@ -1,35 +0,0 @@
odoo.define('beesdoo_shift.barcode_scanner_focus', function (require) {
"use strict";
var core = require('web.core');
var FormViewBarcodeHandler = require('barcodes.FormViewBarcodeHandler');
var BarcodeHandlerUnfocus = FormViewBarcodeHandler.extend({
_set_quantity_listener: function(event) {
console.log("TEST");
this.super();
},
// Method is not called when a field is focus.
on_barcode_scanned: function(barcode) {
console.log("method called");
this._super(barcode);
}
});
core.form_widget_registry.add('barcode_handler_unfocus', BarcodeHandlerUnfocus);
return BarcodeHandlerUnfocus;
/*
var Widget = require('web.Widget');
var BarcodeHandlerUnfocus = Widget.extend({
events: {
'click .oe_stat_button': 'function_test',
}
function_test: function (){
console.log("test handler")
});
});
core.form_widget_registry.add('barcode_handler_unfocus', BarcodeHandlerUnfocus);
return BarcodeHandlerUnfocus;*/
});

10
beesdoo_shift/views/beesdoo_shift_assets.xml

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="assets_backend" name="account assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/beesdoo_shift/static/src/js/barcode_scanner_focus.js"></script>
</xpath>
</template>
</data>
</openerp>
Loading…
Cancel
Save