mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
fixup! [MIG] : Migration to 13.0
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"maintainers": ["LoisRForgeFlow"],
|
||||
"development_status": "Alpha",
|
||||
"category": "Warehouse Management",
|
||||
"depends": ["stock", "stock_available_unreserved",],
|
||||
"data": ["wizards/stock_pull_list_wizard.xml",],
|
||||
"depends": ["stock", "stock_available_unreserved"],
|
||||
"data": ["wizards/stock_pull_list_wizard.xml"],
|
||||
"installable": True,
|
||||
}
|
||||
|
||||
@@ -20,10 +20,10 @@ class TestPullListCommon(TransactionCase):
|
||||
self.customer_loc = self.env.ref("stock.stock_location_customers")
|
||||
|
||||
self.warehouse_2 = self.wh_obj.create(
|
||||
{"code": "WH-T", "name": "Warehouse Test",}
|
||||
{"code": "WH-T", "name": "Warehouse Test"}
|
||||
)
|
||||
self.product_a = self.env["product.product"].create(
|
||||
{"name": "test product A", "default_code": "TEST-A", "type": "product",}
|
||||
{"name": "test product A", "default_code": "TEST-A", "type": "product"}
|
||||
)
|
||||
|
||||
route_vals = {
|
||||
@@ -59,6 +59,7 @@ class TestPullListCommon(TransactionCase):
|
||||
"picking_type_id": self.ref("stock.picking_type_out"),
|
||||
"location_id": self.warehouse.lot_stock_id.id,
|
||||
"location_dest_id": self.customer_loc.id,
|
||||
"scheduled_date": date_move,
|
||||
"move_lines": [
|
||||
(
|
||||
0,
|
||||
|
||||
@@ -22,7 +22,7 @@ class TestStockPullList(TestPullListCommon):
|
||||
|
||||
def test_02_consolidate(self):
|
||||
self._generate_moves()
|
||||
wiz = self.wiz_obj.create({"consolidate_by_product": True,})
|
||||
wiz = self.wiz_obj.create({"consolidate_by_product": True})
|
||||
wiz.action_prepare()
|
||||
line = wiz.line_ids.filtered(lambda l: l.product_id == self.product_a)
|
||||
self.assertEqual(len(line), 1)
|
||||
|
||||
@@ -18,9 +18,7 @@ class PullListWizard(models.TransientModel):
|
||||
wh = self.env["stock.warehouse"].search(
|
||||
[("company_id", "=", company.id)], limit=1
|
||||
)
|
||||
res.update(
|
||||
{"warehouse_id": wh.id, "location_id": wh.lot_stock_id.id,}
|
||||
)
|
||||
res.update({"warehouse_id": wh.id, "location_id": wh.lot_stock_id.id})
|
||||
return res
|
||||
|
||||
location_id = fields.Many2one(comodel_name="stock.location", required=True,)
|
||||
@@ -172,9 +170,7 @@ class PullListWizard(models.TransientModel):
|
||||
for key, demand_qty in demand_dict.items():
|
||||
supply_qty = incoming_dict.get(key, 0.0)
|
||||
lines.append((0, 0, self._prepare_line_values(key, demand_qty, supply_qty)))
|
||||
self.update(
|
||||
{"line_ids": lines,}
|
||||
)
|
||||
self.update({"line_ids": lines})
|
||||
res = self._act_window_pull_list_step_2()
|
||||
return res
|
||||
|
||||
|
||||
Reference in New Issue
Block a user