跳至內容
選單
此問題已被標幟
1 回覆
785 瀏覽次數

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.

相關帖文 回覆 瀏覽次數 活動
4
5月 24
2090
1
2月 19
3997
1
1月 25
825
2
6月 23
2371
0
12月 24
2376