Skip to content

Commit 7d7ba9f

Browse files
[MIG] mrp_warehouse_calendar: Migration to 16.0
1 parent 686e31d commit 7d7ba9f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

mrp_warehouse_calendar/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"name": "MRP Warehouse Calendar",
66
"summary": "Considers the warehouse calendars in manufacturing",
7-
"version": "15.0.1.0.1",
7+
"version": "16.0.1.0.0",
88
"license": "LGPL-3",
99
"website": "https://github.com/OCA/manufacture",
1010
"author": "ForgeFlow, Odoo Community Association (OCA)",

mrp_warehouse_calendar/models/mrp_production.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ class MrpProduction(models.Model):
88
_inherit = "mrp.production"
99

1010
@api.onchange("date_planned_start", "product_id")
11-
def _onchange_date_planned_start(self):
12-
res = super(MrpProduction, self)._onchange_date_planned_start()
11+
def _compute_date_planned_finished(self):
12+
res = super(MrpProduction, self)._compute_date_planned_finished()
1313
if self.date_planned_start and not self.is_planned:
1414
warehouse = self.picking_type_id.warehouse_id
1515
if warehouse.calendar_id:

mrp_warehouse_calendar/tests/test_mrp_warehouse_calendar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ def test_onchange_date_planned(self):
119119
"product_qty": 1,
120120
"picking_type_id": self.env[
121121
"mrp.production"
122-
]._get_default_picking_type(),
122+
]._get_default_picking_type_id(self.company.id),
123123
}
124124
)
125125
mo.date_planned_start = "2097-01-04 09:00:00"
126-
mo._onchange_date_planned_start()
126+
mo._compute_date_planned_finished()
127127
date_plan_finished = fields.Date.to_date(mo.date_planned_finished)
128128
monday = fields.Date.to_date("2097-01-07 09:00:00")
129129
self.assertEqual(date_plan_finished, monday)

0 commit comments

Comments
 (0)