mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[MIG] mrp_multi_level_estimate: Migration to 17.0
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
{
|
||||
"name": "MRP Multi Level Estimate",
|
||||
"version": "16.0.1.1.2",
|
||||
"version": "17.0.1.0.0",
|
||||
"development_status": "Production/Stable",
|
||||
"license": "LGPL-3",
|
||||
"author": "ForgeFlow, Odoo Community Association (OCA)",
|
||||
|
||||
@@ -54,7 +54,7 @@ class TestMrpMultiLevelEstimate(TestMrpMultiLevelCommon):
|
||||
cls.date_without_ranges = today + timedelta(days=150)
|
||||
|
||||
qty = 140.0
|
||||
for sd, ed in zip(start_dates, end_dates):
|
||||
for sd, ed in zip(start_dates, end_dates, strict=True):
|
||||
qty += 70.0
|
||||
cls._create_demand_estimate(cls.prod_test, cls.stock_location, sd, ed, qty)
|
||||
cls._create_demand_estimate(cls.prod_test, cls.estimate_loc, sd, ed, qty)
|
||||
@@ -225,7 +225,8 @@ class TestMrpMultiLevelEstimate(TestMrpMultiLevelCommon):
|
||||
]
|
||||
)
|
||||
self.assertEqual(len(estimates), 3)
|
||||
# Change qty of estimates to quantities that divided by 7 days return a decimal result
|
||||
# Change qty of estimates to quantities that
|
||||
# divided by 7 days return a decimal result
|
||||
qty = 400
|
||||
for estimate in estimates:
|
||||
estimate.product_uom_qty = qty
|
||||
@@ -362,7 +363,7 @@ class TestMrpMultiLevelEstimate(TestMrpMultiLevelCommon):
|
||||
mo_form.product_id = fp_1
|
||||
mo_form.bom_id = fp_1_bom
|
||||
mo_form.product_qty = 10
|
||||
mo_form.date_planned_start = date_mo
|
||||
mo_form.date_start = date_mo
|
||||
mo = mo_form.save()
|
||||
mo.location_src_id = (
|
||||
self.estimate_loc
|
||||
|
||||
@@ -68,7 +68,7 @@ class MultiLevelMrp(models.TransientModel):
|
||||
|
||||
@api.model
|
||||
def _init_mrp_move_from_forecast(self, product_mrp_area):
|
||||
res = super(MultiLevelMrp, self)._init_mrp_move_from_forecast(product_mrp_area)
|
||||
res = super()._init_mrp_move_from_forecast(product_mrp_area)
|
||||
if not product_mrp_area.group_estimate_days:
|
||||
return False
|
||||
today = fields.Date.today()
|
||||
|
||||
Reference in New Issue
Block a user