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

Hello community.

Anyone knows how to disable edit option after one day a contac is created?


[('create_date','=',Datetime.now().strftime('%Y-%m-%d'))]

that doesnt work for me. Please i need help.

頭像
捨棄
最佳答案

I am curious to know the use case for this. Why do you want to do that? 

To achieve it, one way can be, you can modify the write method and check create_date DateTime with current DateTime then raise an exception.

頭像
捨棄
最佳答案

I am not convinced this is a good idea.  

What if the phone number of the contact changes?  Or, what if it isn't known the first day (only email is) and when it is, it can't be added to the record.  What if someone makes a mistake but doesn't realize until the first quote / email / phone call with the Contact happens? The Contact calls back and says "you have my address wrong" and it can't be edited?

What business problem does making the record read-only after 24 hours fix?  What decision does it help support? 

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
1月 24
2593
2
6月 22
4524
2
6月 18
6073
2
11月 16
13700
2
2月 24
12566