跳至内容
菜单
此问题已终结
2 回复
2466 查看

what is the base configuration to create a planned action

形象
丢弃

could you please specify a little more?

编写者
Hello

I am trying to generate a scheduled action that does the following.  after 24 hours you must change the status of a ticket to delayed

El 11 ago 2022, a la(s) 3:03 p.m., Ricardo Gross <notifications@mail.odoo.com> escribió:



could you please specify a little more?

--
Ricardo Gross

Gesendet durch Odoo S.A. in benutzung Odoo.

最佳答案
for rec in model.search([('create_date','>=', datetime.datetime.now() - timedelta(hours=24)),('state','=','ticket')])
rec['state'] = 'delayed'
Hello Francisco Mendez

Activate debug or developer mode and go to Settings --> Technical --> Scheduled Actions --> create new record  as per following screenshot.



for rec in model.search([('create_date','>=', datetime.datetime.now() - timedelta(hours=24)),('state','=','ticket')])
rec['state'] = 'delayed'


Let us know if you still need any help on this, 

Thanks,


Thanks & Regards,



CandidRoot Solutions Pvt. Ltd.

Mobile: (+91) 8849036209
Email: info@candidroot.com
Skype: live:candidroot
Web: https://www.candidroot.com
Address: 1229-1230, Iconic Shyamal, Near Shyamal Cross Road, Ahmedabad, Gujarat 380015
形象
丢弃

thank you, it worked for me

编写者 最佳答案

thanks, it worked correctly

形象
丢弃
相关帖文 回复 查看 活动
0
3月 25
786
0
11月 23
1459
0
3月 15
5954
1
12月 22
6152
0
8月 18
4287