İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
1065 Görünümler

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?

Avatar
Vazgeç
En İyi Yanıt

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

Avatar
Vazgeç
Üretici

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

İlgili Gönderiler Cevaplar Görünümler Aktivite
4
May 24
2729
1
Şub 19
4230
1
Oca 25
1110
2
Haz 23
2610
0
Ara 24
2537