Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion shopfloor/actions/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ def _package_parser(self):
("package_type_id:storage_type", ["id", "name"]),
(
"quant_ids:total_quantity",
lambda rec, fname: sum(rec.quant_ids.mapped("quantity")),
lambda rec, fname: 0
if rec.env.context.get("no_quantity", False)
else sum(rec.quant_ids.mapped("quantity")),
),
Comment on lines 132 to 137
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't the tuple be removed completely instead of returning a wrong value?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sbejaoui Indeed, it could be great as this could lead to wrong information. Could you check also if schema should not be adapted

]

Expand Down
2 changes: 1 addition & 1 deletion shopfloor/services/cluster_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _response_for_scan_destination(self, move_line, message=None, qty_done=None)
# suggest pack to be used for the next line
data["package_dest"] = self.data.package(
last_picked_line.result_package_id.with_context(
picking_id=move_line.picking_id.id
picking_id=move_line.picking_id.id, no_quantity=True
),
picking=move_line.picking_id,
)
Expand Down