[MIG] mrp_progress_button: Migration to 15.0

This commit is contained in:
Bernat Puig Font
2021-11-15 11:54:28 +01:00
parent d93783b181
commit 7319e1ad52
2 changed files with 1 additions and 31 deletions

View File

@@ -8,7 +8,7 @@
"author": "Akretion, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/manufacture",
"category": "Manufacturing",
"version": "14.0.1.1.0",
"version": "15.0.1.0.0",
"license": "AGPL-3",
"depends": ["mrp"],
"data": ["views/production.xml"],

View File

@@ -30,10 +30,6 @@ class TestProgressButton(TransactionCase):
}
)
self._update_product_qty(
self.product_raw_material, self.stock_location_stock, 1
)
self.bom = self.env["mrp.bom"].create(
{
"product_id": self.product_manuf.id,
@@ -54,32 +50,6 @@ class TestProgressButton(TransactionCase):
}
)
def _update_product_qty(self, product, location, quantity):
"""Update Product quantity."""
inventory = self.env["stock.inventory"].create(
{
"name": "Test Inventory",
"product_ids": [(6, 0, product.ids)],
"state": "confirm",
"line_ids": [
(
0,
0,
{
"product_qty": quantity,
"location_id": location.id,
"product_id": product.id,
"product_uom_id": product.uom_id.id,
},
)
],
}
)
inventory.action_start()
inventory.line_ids[0].write({"product_qty": quantity})
inventory.action_validate()
return quantity
def test_manufacture_with_forecast_stock(self):
"""
Test Manufacture mto with stock based on forecast quantity