Skip to Content
Menú
This question has been flagged
1371 Vistes

Hi all,


I am adding a custom field to Helpdesk ticket where i need to update it with a python script.

At the moment in my python script i update the stage on mail received when a ticket is in a certain stage but how can i update my custom field at the same time?


Here is the code with which i update the stage:


if record.res_id:
  existing_ticket = env['helpdesk.ticket'].search([('id','=',record.res_id)])
  closed_stages = [29]
  if "Odoo treats this as a link" in closed_stages:
    existing_ticket.write ({'stage_id': 21})


Thank you

Avatar
Descartar
Related Posts Respostes Vistes Activitat
0
de març 25
1397
1
de set. 24
1521
1
d’ag. 24
1623
1
de jul. 24
1506
0
de març 24
193