mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[MIG] mrp_progress_button: Migration to 14.0
This commit is contained in:
committed by
AaronHForgeFlow
parent
0dd628175c
commit
08623a9e4d
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user