19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:31:47 +01:00
parent accf5918df
commit 6e65e8c877
688 changed files with 225434 additions and 199401 deletions

View file

@ -31,12 +31,12 @@ class TestMrpSerialMassProducePerformance(common.TransactionCase):
for i in range(raw_materials_count):
raw_materials.append(self.env['product.product'].create({
'name': '@raw_material#' + str(i + 1),
'type': 'product',
'is_storable': True,
'tracking': trackings[i % len(trackings)]
}))
finished = self.env['product.product'].create({
'name': '@finished',
'type': 'product',
'is_storable': True,
'tracking': 'serial',
})
bom = self.env['mrp.bom'].create({
@ -70,7 +70,6 @@ class TestMrpSerialMassProducePerformance(common.TransactionCase):
while qty > 0:
lot = self.env['stock.lot'].create({
'product_id': raw_materials[i].id,
'company_id': self.env.company.id,
})
self.env['stock.quant'].with_context(inventory_mode=True).create({
'product_id': raw_materials[i].id,
@ -83,7 +82,6 @@ class TestMrpSerialMassProducePerformance(common.TransactionCase):
for _ in range(total_quantity):
lot = self.env['stock.lot'].create({
'product_id': raw_materials[i].id,
'company_id': self.env.company.id,
})
self.env['stock.quant'].with_context(inventory_mode=True).create({
'product_id': raw_materials[i].id,
@ -94,7 +92,7 @@ class TestMrpSerialMassProducePerformance(common.TransactionCase):
mo.action_assign()
action = mo.action_serial_mass_produce_wizard()
action = mo.action_mass_produce()
wizard = Form(self.env['stock.assign.serial'].with_context(**action['context']))
wizard.next_serial_number = "sn#1"
wizard.next_serial_count = quantity