Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
974 Widoki

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?

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

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

Powiązane posty Odpowiedzi Widoki Czynność
4
maj 24
2528
1
lut 19
4157
1
sty 25
1015
2
cze 23
2522
0
gru 24
2499