feat(#60): Automatización configurable de re-muestreo y reorganización de estados #62
BIN
documents/logs/Screenshot_4.png
Normal file
BIN
documents/logs/Screenshot_4.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
BIN
documents/logs/Screenshot_5.png
Normal file
BIN
documents/logs/Screenshot_5.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
|
@ -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'),
|
||||
|
|
Loading…
Reference in New Issue
Block a user