Skip to content

Commit

Permalink
[FIX] *: avoid waring of invalidate_cache()
Browse files Browse the repository at this point in the history
  • Loading branch information
MiquelRForgeFlow committed Nov 15, 2024
1 parent 3c04b80 commit 4bcfa70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_picking_shipping_weight(self):
# Check shipping weight knowing there is no shipping weight on the package
self.assertEqual(picking.shipping_weight, 16)
pack.shipping_weight = 6
picking.invalidate_cache(["shipping_weight"])
picking.invalidate_model(["shipping_weight"])
self.assertEqual(picking.shipping_weight, 15)
picking._action_done()
# Check the manualy set weight is not lost when quants are inserted in the package
Expand Down
4 changes: 2 additions & 2 deletions stock_restrict_lot/tests/test_restrict_lot.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,11 @@ def test_compute_quantites(self):

product = move.product_id
self.assertEqual(product.outgoing_qty, 2)
product.invalidate_cache()
product.env.invalidate_all()
product = product.with_context(lot_id=self.lot.id)
self.assertEqual(product.outgoing_qty, 1)

product.invalidate_cache()
product.env.invalidate_all()
product = product.with_context(lot_id=lot2.id)
self.assertEqual(product.outgoing_qty, 1)

Expand Down

0 comments on commit 4bcfa70

Please sign in to comment.