Scan_barcode not working in stock Reconciliation. It is working in sales order

I have scan_barcode on sales order. It is working fine there. I had then added scan_barcode to Stock Reconciliation yesterday same as sales order but it is not working (No events are triggering ). Erpnext v13

@bluesky @szufisher
Please help me.

do Barcode scanner works on Stock Reconciliation?

I know I am late to the party, but this is how u do it:
add this function to apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js:

scan_barcode: function() {
		let transaction_controller= new erpnext.TransactionController({frm:this.frm});
		transaction_controller.scan_barcode();
	},
  1. added the following custom field into Stock Reconciliation DocType via customize form(refer to the same field in Stock Entry)
    fieldtype:Data
    Label:Scan Barcode
    options:Barcode

  2. create a client script for Stock Reconciliation, code as below( minor changes made)

frappe.ui.form.on('Stock Reconciliation', {
	scan_barcode: function(frm) {
		let transaction_controller= new erpnext.TransactionController({frm:frm});
		transaction_controller.scan_barcode();
	}
})
1 Like

Yeah, that’s about what I did. Nice explanation. And better solution using custom script.
As I understand maintainers are deciding if this should be added due to conflic. https://github.com/frappe/erpnext/issues/9557