diff --git a/stock_barcodes/models/stock_barcodes_option.py b/stock_barcodes/models/stock_barcodes_option.py
index 2979186772a7..c78fe5bdcc30 100644
--- a/stock_barcodes/models/stock_barcodes_option.py
+++ b/stock_barcodes/models/stock_barcodes_option.py
@@ -35,7 +35,7 @@ class StockBarcodesOptionGroup(models.Model):
string="Show pending moves", help="Shows a list of movements to process"
)
source_pending_moves = fields.Selection(
- [("move_line_ids", "Detailed operations"), ("move_lines", "Operations")],
+ [("move_line_ids", "Detailed operations"), ("move_ids", "Operations")],
default="move_line_ids",
help="Origin of the data to generate the movements to process",
)
@@ -103,6 +103,10 @@ class StockBarcodesOptionGroup(models.Model):
("location_dest_id", "Destination Location"),
]
)
+ scan_product_one_by_one = fields.Boolean(
+ help="Will set the product quantity to one and complete the line",
+ string="Scan product one by one"
+ )
def get_option_value(self, field_name, attribute):
option = self.option_ids.filtered(lambda op: op.field_name == field_name)[:1]
diff --git a/stock_barcodes/views/stock_barcodes_option_view.xml b/stock_barcodes/views/stock_barcodes_option_view.xml
index ff26fe0bf402..6215cfc2708f 100644
--- a/stock_barcodes/views/stock_barcodes_option_view.xml
+++ b/stock_barcodes/views/stock_barcodes_option_view.xml
@@ -47,6 +47,7 @@
+
diff --git a/stock_barcodes/views/stock_picking_views.xml b/stock_barcodes/views/stock_picking_views.xml
index ef54efbf3bc0..05ac256a8c75 100644
--- a/stock_barcodes/views/stock_picking_views.xml
+++ b/stock_barcodes/views/stock_picking_views.xml
@@ -46,9 +46,11 @@
+
@@ -74,6 +74,7 @@
@@ -245,114 +246,113 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
- Package:
+ Lot:
-
+
+
+ Package:
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/stock_barcodes/wizard/stock_barcodes_read_todo.py b/stock_barcodes/wizard/stock_barcodes_read_todo.py
index 7a6d87e7e41f..003354b9d7a5 100644
--- a/stock_barcodes/wizard/stock_barcodes_read_todo.py
+++ b/stock_barcodes/wizard/stock_barcodes_read_todo.py
@@ -83,7 +83,6 @@ def _get_all_products_quantities_in_package(self, package):
def _prepare_fill_record_values(self, wiz_barcode, line, position):
vals = {
"product_id": line.product_id.id,
- "product_uom_qty": line.product_uom_qty,
"name": "To do action",
"position_index": position,
"picking_code": line.picking_code,
@@ -94,6 +93,7 @@ def _prepare_fill_record_values(self, wiz_barcode, line, position):
)
vals.update(
{
+ "product_uom_qty": line.move_id.product_uom_qty,
"location_id": line.location_id.id,
"location_dest_id": line.location_dest_id.id,
"lot_id": line.lot_id.id,
@@ -111,6 +111,7 @@ def _prepare_fill_record_values(self, wiz_barcode, line, position):
else:
vals.update(
{
+ "product_uom_qty": line.move_id.product_uom_qty,
"location_id": (line.move_line_ids[:1] or line).location_id.id,
"location_dest_id": (
line.move_line_ids[:1] or line