diff --git a/addons/mrp/models/mrp_production.py b/addons/mrp/models/mrp_production.py
index 068e1d23a33..d3d96f371e9 100644
--- a/addons/mrp/models/mrp_production.py
+++ b/addons/mrp/models/mrp_production.py
@@ -1158,12 +1158,7 @@ class MrpProduction(models.Model):
# Instantiate start_date for the next workorder planning
if workorder.next_work_order_id:
- if not workorder.operation_id or workorder.operation_id.batch == 'no' or workorder.operation_id.batch_size >= qty_to_produce:
- start_date = best_finished_date
- else:
- cycle_number = float_round(workorder.operation_id.batch_size / best_workcenter.capacity, precision_digits=0, rounding_method='UP')
- duration = best_workcenter.time_start + cycle_number * workorder.operation_id.time_cycle * 100.0 / best_workcenter.time_efficiency
- start_date = best_workcenter.resource_calendar_id.plan_hours(duration / 60.0, best_start_date, compute_leaves=True, resource=best_workcenter.resource_id, domain=[('time_type', 'in', ['leave', 'other'])])
+ start_date = best_finished_date
# Create leave on chosen workcenter calendar
leave = self.env['resource.calendar.leaves'].create({
diff --git a/addons/mrp/models/mrp_routing.py b/addons/mrp/models/mrp_routing.py
index 5179bbd33dc..eed44980348 100644
--- a/addons/mrp/models/mrp_routing.py
+++ b/addons/mrp/models/mrp_routing.py
@@ -41,11 +41,6 @@ class MrpRoutingWorkcenter(models.Model):
help="Time in minutes. Is the time used in manual mode, or the first time supposed in real time when there are not any work orders yet.")
time_cycle = fields.Float('Duration', compute="_compute_time_cycle")
workorder_count = fields.Integer("# Work Orders", compute="_compute_workorder_count")
- batch = fields.Selection([
- ('no', 'Once all products are processed'),
- ('yes', 'Once some products are processed')], string='Start Next Operation',
- default='no', required=True)
- batch_size = fields.Float('Quantity to Process', default=1.0)
workorder_ids = fields.One2many('mrp.workorder', 'operation_id', string="Work Orders")
@api.depends('time_cycle_manual', 'time_mode', 'workorder_ids')
diff --git a/addons/mrp/models/mrp_workorder.py b/addons/mrp/models/mrp_workorder.py
index 30824a7ff0d..4a7a64c3639 100644
--- a/addons/mrp/models/mrp_workorder.py
+++ b/addons/mrp/models/mrp_workorder.py
@@ -462,13 +462,6 @@ class MrpWorkorder(models.Model):
return self.production_id.move_finished_ids.filtered(lambda x: (x.product_id.id != self.production_id.product_id.id) and (x.state not in ('done', 'cancel')))
def _start_nextworkorder(self):
- rounding = self.product_id.uom_id.rounding
- if self.next_work_order_id.state == 'pending' and (
- (self.operation_id.batch == 'no' and
- float_compare(self.qty_production, self.qty_produced, precision_rounding=rounding) <= 0) or
- (self.operation_id.batch == 'yes' and
- float_compare(self.operation_id.batch_size, self.qty_produced, precision_rounding=rounding) <= 0)):
- self.next_work_order_id.state = 'ready'
if self.state == 'done' and self.next_work_order_id.state == 'pending':
self.next_work_order_id.state = 'ready'
diff --git a/addons/mrp/views/mrp_routing_views.xml b/addons/mrp/views/mrp_routing_views.xml
index e56ad053b4a..4ad13055769 100644
--- a/addons/mrp/views/mrp_routing_views.xml
+++ b/addons/mrp/views/mrp_routing_views.xml
@@ -43,10 +43,6 @@
-
-
-
-
diff --git a/addons/mrp_account/tests/test_bom_price.py b/addons/mrp_account/tests/test_bom_price.py
index 813a8c2b6a8..fd5b76c9656 100644
--- a/addons/mrp_account/tests/test_bom_price.py
+++ b/addons/mrp_account/tests/test_bom_price.py
@@ -124,7 +124,6 @@ class TestBom(common.TransactionCase):
'workcenter_id': workcenter_1.id,
'time_mode': 'manual',
'time_cycle_manual': 20,
- 'batch': 'no',
'sequence': 1,
}),
(0, 0, {
@@ -132,7 +131,6 @@ class TestBom(common.TransactionCase):
'workcenter_id': workcenter_1.id,
'time_mode': 'manual',
'time_cycle_manual': 25,
- 'batch': 'no',
'sequence': 2,
}),
(0, 0, {
@@ -140,7 +138,6 @@ class TestBom(common.TransactionCase):
'workcenter_id': workcenter_1.id,
'time_mode': 'manual',
'time_cycle_manual': 30,
- 'batch': 'no',
'sequence': 3,
}),
],
@@ -152,7 +149,6 @@ class TestBom(common.TransactionCase):
'workcenter_id': workcenter_1.id,
'time_mode': 'manual',
'time_cycle_manual': 20,
- 'batch': 'no',
'sequence': 1,
}),
(0, 0, {
@@ -160,7 +156,6 @@ class TestBom(common.TransactionCase):
'workcenter_id': workcenter_1.id,
'time_mode': 'manual',
'time_cycle_manual': 25,
- 'batch': 'no',
'sequence': 2,
}),
(0, 0, {
@@ -168,7 +163,6 @@ class TestBom(common.TransactionCase):
'workcenter_id': workcenter_1.id,
'time_mode': 'manual',
'time_cycle_manual': 30,
- 'batch': 'no',
'sequence': 3,
}),
],