Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1465 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 3 25
1484
1
thg 9 24
1577
1
thg 8 24
1669
1
thg 7 24
1543
0
thg 3 24
193