Skip to content

Commit

Permalink
[MIG] stock_package_autoload: Migation to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
anusriNPS committed Dec 16, 2024
1 parent 7e9b9f4 commit 57d6aeb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions stock_package_autoload/models/stock_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def _onchange_load_products_from_package_id(self):
"package_id": self.load_products_from_package_id.id,
"location_id": self.location_id.id,
"location_dest_id": self.location_dest_id.id,
"company_id": self.company_id.id,
}
data_list = []
for quant in product_quants:
Expand Down
10 changes: 6 additions & 4 deletions stock_package_autoload/tests/test_stock_package_autoload.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
from odoo.tests.common import SavepointCase
from odoo.tests.common import TransactionCase, tagged


class TestStockPackageAutoload(SavepointCase):
@tagged("post_install", "-at_install")
class TestStockPackageAutoload(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.ProductProduct = cls.env["product.product"]
cls.StockMove = cls.env["stock.move"]
cls.StockMoveLine = cls.env["stock.move.line"]
cls.StockPicking = cls.env["stock.picking"]
cls.StockProductionLot = cls.env["stock.production.lot"]
cls.StockProductionLot = cls.env["stock.lot"]
cls.StockQuantPackage = cls.env["stock.quant.package"]

cls.company = cls.env.company
Expand Down Expand Up @@ -70,10 +71,11 @@ def test_autoload_package(self):
0,
{
"product_id": self.product.id,
"product_uom_qty": 3,
"reserved_uom_qty": 3,
"product_uom_id": self.uom_unit.id,
"location_id": self.location.id,
"location_dest_id": self.location_dest.id,
"company_id": self.env.company.id,
},
)
],
Expand Down

0 comments on commit 57d6aeb

Please sign in to comment.