feat(#60): Automatización configurable de re-muestreo y reorganización de estados #62

Merged
luis_portillo merged 7 commits from feature/60-user-assignment-improvements into dev 2025-07-16 16:31:43 +00:00
3 changed files with 4 additions and 0 deletions
Showing only changes of commit 1e079a896b - Show all commits

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -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'),