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