Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
1069 Vizualizări

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?

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Autor

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

Related Posts Răspunsuri Vizualizări Activitate
4
mai 24
2735
1
feb. 19
4234
1
ian. 25
1115
2
iun. 23
2612
0
dec. 24
2537