diff options
| author | Géry Debongnie <ged@odoo.com> | 2017-03-05 10:05:56 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-04-11 19:44:38 +0200 |
| commit | 905e01921f3c3ef43ace6fc537d1d8c0d280002c (patch) | |
| tree | 265c43ab21c5401a5d9f0f3d64d86f1ac417451c /addons/barcodes/static/src/js/form_view_barcode_handler.js | |
| parent | 54d4c73af4ad05c7640d28c1892247c9538b8017 (diff) | |
[REF] web, *: redesign all JS views
This commit introduce a full redesign of all JS views. We started
basically from scratch. The goal was to unify all the various views
under a common framework, to make them testable, to make then usable in
different conditions (in studio, or in the frontend), and to make our
lives easier.
Some important points are:
- we introduced new coding guidelines (camelCase, 80 chars width, ...)
- we have a brand new testing framework (still QUnit based)
- kanban view moved to the web addon
- calendar view (formerly web_calender) moved to web as well
- the tree view was removed
- all new code should be documented
We hope that this code is the start of a new era for the Odoo web
client, we want to have a high quality codebase, well documented, well
tested, well designed.
Work done by the framework team: mostly aab, ged, chm, dmo, qsm
Diffstat (limited to 'addons/barcodes/static/src/js/form_view_barcode_handler.js')
| -rw-r--r-- | addons/barcodes/static/src/js/form_view_barcode_handler.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/addons/barcodes/static/src/js/form_view_barcode_handler.js b/addons/barcodes/static/src/js/form_view_barcode_handler.js index 524ec1513c3..52045c59a77 100644 --- a/addons/barcodes/static/src/js/form_view_barcode_handler.js +++ b/addons/barcodes/static/src/js/form_view_barcode_handler.js @@ -2,16 +2,15 @@ odoo.define('barcodes.FormViewBarcodeHandler', function(require) { "use strict"; var core = require('web.core'); -var utils = require('web.utils'); -var common = require('web.form_common'); +var concurrency = require('web.concurrency'); var BarcodeEvents = require('barcodes.BarcodeEvents'); var BarcodeHandlerMixin = require('barcodes.BarcodeHandlerMixin'); -var KanbanRecord = require('web_kanban.Record'); +var KanbanRecord = require('web.KanbanRecord'); var Dialog = require('web.Dialog'); var _t = core._t; -// web_kanban.Record and web.list_common.Record do not implement the +// web.KanbanRecord and web.list_common.Record do not implement the // same interface and are thus inherently incompatible with each // other. Luckily barcodes keeps things pretty simple when it comes to // the records it wants to use. So if we give the KanbanRecord a get() @@ -28,7 +27,7 @@ var FormViewBarcodeHandler = common.AbstractField.extend(BarcodeHandlerMixin, { this.__quantity_listener = _.bind(this._set_quantity_listener, this); BarcodeHandlerMixin.init.apply(this, arguments); - this.process_barcode_mutex = new utils.Mutex(); + this.process_barcode_mutex = new concurrency.Mutex(); return this._super.apply(this, arguments); }, @@ -165,7 +164,7 @@ var FormViewBarcodeHandler = common.AbstractField.extend(BarcodeHandlerMixin, { // before setting the barcode field with the received barcode, we commit // every fields of the form view and we wait for their hypothetical ongoing // onchanges to finish - var commit_mutex = new utils.Mutex(); + var commit_mutex = new concurrency.Mutex(); _.each(self.form_view.fields, function (field) { commit_mutex.exec(function () { return field.commit_value(); |
