summaryrefslogtreecommitdiff
path: root/addons/barcodes/static/src
AgeCommit message (Collapse)Author
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