[MIG] mrp_progress_button: Migration to 14.0

This commit is contained in:
Bernat Puig Font
2021-10-18 16:10:32 +02:00
committed by AaronHForgeFlow
parent 0dd628175c
commit 08623a9e4d
4 changed files with 24 additions and 11 deletions

View File

@@ -56,15 +56,29 @@ class TestProgressButton(TransactionCase):
def _update_product_qty(self, product, location, quantity):
"""Update Product quantity."""
product_qty = self.env["stock.change.product.qty"].create(
inventory = self.env["stock.inventory"].create(
{
"location_id": location.id,
"product_id": product.id,
"new_quantity": quantity,
"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,
},
)
],
}
)
product_qty.change_product_qty()
return product_qty
inventory.action_start()
inventory.line_ids[0].write({"product_qty": quantity})
inventory.action_validate()
return quantity
def test_manufacture_with_forecast_stock(self):
"""