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

I need to create automated action that will send me an email when the total number of hours spent on tasks will exceed the number of hours planned.

But i don't know how to compare those two variables into a domain, also the total number of hours spent can be used as a trigger but not for the domain.

Do i need to use python or is there a way around it ?

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

Hi,

If you want to use compare two fields in automated action so you need to use python code and send an email from python code, or you can add another field which store the value of the comparation and then use it in the automated action domain.

อวตาร
ละทิ้ง
ผู้เขียน

How can i add another field calculating that ?

Are you using Odoo Enterprise with Studio app or using Odoo Community?

ผู้เขียน

Odoo enterprise

You can create Boolean computed field in task and set the field store as True (to be able to use in domain) and use depends on fields (total number of hours spent, number of hours planned) and then in compute python code set your python code to compare the two hours and set the Boolean field to true or false.

Follow the below article for how to create computed field using studio
https://odootricks.tips/about/building-blocks/computed-fields/

ผู้เขียน

It's working ! Thank you so much, you're a life saver

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ต.ค. 23
2379
0
ก.พ. 25
18
1
ต.ค. 23
1897
0
มี.ค. 23
1234
1
มี.ค. 23
7745