diff --git a/documents/logs/Screenshot_4.png b/documents/logs/Screenshot_4.png new file mode 100644 index 0000000..f136098 Binary files /dev/null and b/documents/logs/Screenshot_4.png differ diff --git a/documents/logs/Screenshot_5.png b/documents/logs/Screenshot_5.png new file mode 100644 index 0000000..a9b985a Binary files /dev/null and b/documents/logs/Screenshot_5.png differ diff --git a/lims_management/models/stock_lot.py b/lims_management/models/stock_lot.py index 5cd2659..f18c1d1 100644 --- a/lims_management/models/stock_lot.py +++ b/lims_management/models/stock_lot.py @@ -490,10 +490,14 @@ class StockLot(models.Model): if receptionist_group: receptionist_users = receptionist_group.users + # Get the model id for stock.lot + model_id = self.env['ir.model'].search([('model', '=', 'stock.lot')], limit=1).id + # Create activities for receptionists for user in receptionist_users: self.env['mail.activity'].create({ 'res_model': 'stock.lot', + 'res_model_id': model_id, # Campo obligatorio 'res_id': resample.id, 'activity_type_id': self.env.ref('mail.mail_activity_data_todo').id, 'summary': _('Nueva re-muestra pendiente de recolección'),