summaryrefslogtreecommitdiff
path: root/addons/barcodes/static/src
AgeCommit message (Collapse)Author
2016-05-10[FIX] barcodes: also allow barcodes triggering buttons in dropdownsJoren Van Onder
On smaller screens some buttons will be hidden. An example of this is the 'Validate' button in the stock.picking form view. It is not :visible but it should still be possible to trigger through scanning a 'O-BTN.validate' barcode. opw-676741
2016-03-18[FIX] barcodes: first qualify the quantity event before handling itJoren Van Onder
Introduced by 5bb64d40d0b94b252c2e29e6a050ae37fbd87b0f. Before doing anything we should first ensure that the quantity keypress event targets body (and that it is a number, but that's less important). Before this we didn't do that and thus the _display_no_edit_mode_warning was given when people where just typing in the associated thread of a picking. opw-672350
2016-03-17[IMP] barcodes: allow immediate quantity input after scanningJoren Van Onder
When scanning items with a device like the Symbol MC3200 you are presented with the Kanban view because of it's limited resolution. In this view it is not possible to quickly set the quantity of scanned products. Ideally users just want to scan the barcode, input the quantity and repeat without having to click on virtual buttons on the usually less than ideal touchscreen. This implements a way for users to immediately start typing numbers representing a quantity after scanning a barcode. The quantity will be set on the specified m2x_field.quantity_field of the record associated to the last scanned barcode. Because KanbanRecords are not editable without opening a new view window.prompt is used. It will create an easy to use native dialog of whatever device is being used. It also avoids us having to implement a custom input field which would have to handle keypress events like numbers, backspace, delete, etc.
2016-03-17[IMP] stock, barcodes: make barcode operations more mobile friendlyJoren Van Onder
We want to properly support devices like the Symbol MC3200. This is a handheld computer running a modern operating system like Android or Windows with an integrated barcode scanner. After installation of a modern web browser and configuration of the integrated barcode scanner Odoo works as well as it does anywhere else. The main issue with these types of devices is that the displays (and their resolution) are very small (3" @ 320x320 for Symbol MC3200). Because of this a lot of tree views become awkward to use because they require vertical scrolling. A Kanban view however scales nicely on these displays. This implements Kanban views for both the picking.form view and the stock.inventory form view because those are the views typically used when using a barcode scanner. Doing this alone is not enough, because the barcodes module does not work with Kanban views. Small changes where made to barcodes.FormViewBarcodeHandler to make it work with both List views and Kanban views.
2016-01-04[FIX] barcode: value representation for scannable field floatArthur Maniet
The value was stored as a string when it should have been a float. opw-665376
2015-09-15[FIX] barcodes: don't require suffix for scansArthur Maniet
Users don't have to configure their scanner. As stated in the docs/planner, either wait 50ms between 2 scans or use a suffix.
2015-09-11[FIX] barcodes: dumb typoArthur Maniet
2015-09-11[IMP] barcodes: form views action barcodesArthur Maniet
Make all common form operations doable through barcode scanning
2015-09-11[IMP] barcodes: form view barcode handler 'pre_onchange_hook' mechanismArthur Maniet
Since the method must return a deferred, resolve it with true to proceed with onchange and with false to prevent the onchange. Deferred failure is not an option.
2015-09-03[ADD] stock_barcode: field widget with barcodes scan + manual inputArthur Maniet
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.
2015-09-03[IMP] barcodes: BarcodeEvents uses reserved barcodes prefixesArthur Maniet
Export a list of barcodes prefixes used for software functionss
2015-09-01[FIX] barcodes: use _.bind instead of function.bind because IEArthur Maniet
2015-09-01[ADD] barcodes/web: element button can use attribute barcode_triggerArthur Maniet
A button can be triggered when a barcode corresponding to its attribute 'barcode_trigger' is scanned
2015-09-01[ADD] barcodes: BarcodeHandlerMixin that starts/stops the event handlingArthur Maniet
Only the barcode handlers in the front view should listen to barcode events.
2015-09-01[ADD] barcodes: onchange-like mechanism to react to scans in form viewArthur Maniet
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.
2015-08-05[FIX] barcodes: key repeat prevention was mistakenly activatedArthur Maniet
TIL: The $(callback) function passes the jquery object to the callback
2015-07-30[FIX/REF] barcodes: don't catch keypress if a control key is pressedArthur Maniet
This avoids breaking shortcuts on Firefox, which rely on keypress events instead of keydown / keyup. The tradeoff is that a barcode cannot be scanned and interpreted if ctrl, alt or cmd is pressed. Also don't catch function keys.
2015-07-30[FIX] barcodes: styleArthur Maniet
2015-07-30[IMP] barcodes: use a regexp to match a barcodeArthur Maniet
2015-07-30[IMP] barcodes: use a known terminal char to stops buffering keysArthur Maniet
BarcodeEvents uses the fact that a barcode usually ends with \n, \r or \t - and never contains it - to stop buffing keys as soon as such a character is inputted instead of waiting x milliseconds.
2015-07-30[REF] barcodes: make key repeat prevention optionalArthur Maniet
This functionality was an attemps to fix the chair-to-keyboard interface in the PoS. Since it is not a standard behaviour, it must be explicitly requested.
2015-07-30[FIX] barcodes: BarcodeEvents handler binding and unbindingArthur Maniet
In order to remove an eventhandler, removeEventListener must receive the same function reference that was passed to addEventListener. So the handlers references are kept as attributes of the class.
2015-07-30[REF] web: move barcode_events to module barcodesArthur Maniet
If the module barcodes is installed, a BarcodeEvents singleton is automatically instanciated. It listens to keypresses and, when a sequence of keys represents a barcode, it broadcasts a 'barcode_scanned' event on core.bus containing the barcode string.
2015-07-22[MERGE] forward port of branch saas-6 up to 63e92cbChristophe Simonis
2015-07-10[IMP] web: split model.js into model.js and data_model.js. Web js modules ↵Christophe Matthieu
must call web.DataModel.
2015-07-02[FIX] barcode_parser: don't match end of lineJoren Van Onder
Causes issues with the card reader device.
2015-06-29[FIX] barcodes: correctly recompute the checksum of the product barcode when ↵Frédéric van der Essen
guessing it from a value encoding barcode
2015-05-28[MERGE] forward port of branch saas-6 up to bf1e999Christophe Simonis
2015-05-05[FIX] point_of_sale: barcode patterns must match barcode as prefix, (and not ↵Frédéric van der Essen
anywhere in barcode)
2015-03-18[IMP] web+addons: improvement to module systemGéry Debongnie
The module system needs to know the dependencies of a given module before executing the function. This is why the dependencies were defined once in an array, and then were described one more times in the call to require. But a trick can simplify this: the boot function can parse the string representation of the module and extract the calls to require from it. It is more work for the processor, but it leads to simpler module definitions.
2015-03-18[REF] barcodes: update to the new module systemGéry Debongnie
2015-01-28[FIX] barcodes: typo in function nameFrédéric van der Essen
2015-01-13[IMP] barcodes, point_of_sale : add support for UPC-A barcodesFrédéric van der Essen
- Added support for UPC-A Barcodes - Add a way to automatically convert UPC-A to and from EAN13. This is usefull if you wish to standardise your product barcode encoding in one standard but have a mix of the two in your merchandise. - Various bugfixes.
2014-11-26[FIX] barcodes: parse_barcode functions in PY and JS commentedAaron Bohy
2014-11-26[FIX] barcodes, stock, point_of_sale: parse_barcode function uses regex, ↵Aaron Bohy
pattern and barcodes may now contain special characters \ { and ., special character * replaced by .
2014-11-26[FIX] barcodes: prepend a zero to ean13 barcodes scanned before looking for ↵Aaron Bohy
a match
2014-11-26[FIX] barcodes,point_of_sale,stock,base: minor changes from code reviewAaron Bohy
2014-11-26[FIX] barcodes, point_of_sale: JS functions for parsing barcode moved to ↵Aaron Bohy
module barcodes, BarcodeParser
2014-11-26[FIX]: stock: weighted type of patterns added in stockAaron Bohy
2014-11-26[IMP] barcodes,point_of_sale : parse_code js function moved to barcodes moduleAaron Bohy