Skip to content
Snippets Groups Projects
Commit d0423b5e authored by Arthur Maniet's avatar Arthur Maniet
Browse files

[IMP] barcodes: form views action barcodes

Make all common form operations doable through barcode scanning
parent 5b96b434
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@ var FormViewBarcodeHandler = common.AbstractField.extend(BarcodeHandlerMixin, {
// Hardcoded barcode actions
this.map_barcode_method = {
'O-CMD.NEW': _.bind(this.form_view.on_button_new, this.form_view),
'O-CMD.EDIT': _.bind(this.form_view.on_button_edit, this.form_view),
'O-CMD.CANCEL': _.bind(this.form_view.on_button_cancel, this.form_view),
// FIXME: on_button_save shouldn't mix view and model concerns (it expects to be used as onclick handler)
'O-CMD.SAVE': _.bind(this.form_view.on_button_save, this.form_view, {target: $('.o_cp_buttons .o_form_button_save')}),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment