Skip to content
Snippets Groups Projects
Commit 8dc476c7 authored by William Henrotin's avatar William Henrotin
Browse files

[FIX] stock: speed up lot creation


Creating lots of production lot can take a huge amount of time if the
mail message follower is added on each chatter.

This commit removes this functionality to speed up the creation as
there is no real need to have the lot creator as follower of it.

closes odoo/odoo#78401

Signed-off-by: default avatarRémy Voet <ryv-odoo@users.noreply.github.com>
Signed-off-by: default avatarWilliam Henrotin <Whenrow@users.noreply.github.com>
parent 0c7c5d7c
Branches
Tags
No related merge requests found
......@@ -77,7 +77,7 @@ class ProductionLot(models.Model):
@api.model_create_multi
def create(self, vals_list):
self._check_create()
return super(ProductionLot, self).create(vals_list)
return super(ProductionLot, self.with_context(mail_create_nosubscribe=True)).create(vals_list)
def write(self, vals):
if 'company_id' in vals:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment