Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
1108 มุมมอง

I am trying to write some code to make an automation that will populate a date field that is 3 days from now I have this code 

record.x_studio_three_days_after_quotation_sent = datetime.datetime.now () + datetime.timedelta(days=3	

but it gives me an error: " forbidden opcode(s) in 'record.x_studio_three_days_after_quotation_sent = datetime.datetime.now () + datetime.timedelta(days=3)': STORE_ATTR"

I am only using studio not sh. Does anyone have any ideas?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

are you looping in self?

for record in self:

​record.x_studio_three_days_after_quotation_sent = datetime.datetime.now () + datetime.timedelta(days=3)

would be a good idea to provide more context if possible

อวตาร
ละทิ้ง
ผู้เขียน

I am not looping I want to put one line of code in the 'Execute Code' action in an automation.

Related Posts ตอบกลับ มุมมอง กิจกรรม
4
พ.ค. 24
2789
1
ก.พ. 19
4266
1
ม.ค. 25
1127
Can't automzatize a task via studio แก้ไขแล้ว
2
มิ.ย. 23
2633
0
ธ.ค. 24
2563