Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
2082 มุมมอง

Hi, with Studio I added a field in the Contact screen to set a date. Is there a way to add another field below that shows the remaining days left till the date that is set in the previous field? I am familiar with simple coding if this is necessary.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Absolutely! If you add a new field, you should be able to tell it to determine the time duration since the date entered into the prior field. JavaScript or Python, depending on your comfort with either language, can perform this function.

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

We use the online version (odoo.com), I think this cannot be retained. What you think?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

You can add a compute field in the same model and then subtract the selected date with today's date and then show the days left.

For adding compute field from UI: https://www.youtube.com/watch?v=j981dytxE28

For adding compute field from code: https://www.youtube.com/watch?v=RirBoceNT5Q


Thanks

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.พ. 24
3535
2
ก.ค. 25
12290
1
ก.ย. 21
3567
0
ก.ย. 20
3399
2
เม.ย. 16
5975