Skip to content

Commit

Permalink
chore: reuse doc object in test_pick_list_grouping_before_print (back…
Browse files Browse the repository at this point in the history
…port #33636) (#33637)

chore: reuse doc object in test_pick_list_grouping_before_print (#33636)

(cherry picked from commit e22d564)

Co-authored-by: Ritwik Puri <ritwikpuri5678@gmail.com>
  • Loading branch information
mergify[bot] and phot0n authored Jan 12, 2023
1 parent 28f2d35 commit 1f0a569
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions erpnext/stock/doctype/pick_list/test_pick_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,16 +460,7 @@ def _compare_dicts(a, b):
self.assertEqual(len(pl.locations), 4)

# grouping should halve the number of items
pl = frappe.get_doc(
doctype="Pick List",
group_same_items=True,
locations=[
_dict(item_code="A", warehouse="X", qty=5, picked_qty=1),
_dict(item_code="B", warehouse="Y", qty=4, picked_qty=2),
_dict(item_code="A", warehouse="X", qty=3, picked_qty=2),
_dict(item_code="B", warehouse="Y", qty=2, picked_qty=2),
],
)
pl.group_same_items = True
pl.before_print()
self.assertEqual(len(pl.locations), 2)

Expand Down

0 comments on commit 1f0a569

Please sign in to comment.