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

Hello Expert,

Hope Somebody help me with this topic! So I'm new to odoo and I'm trying to use compute Fields

Here is the situation i have transactions and agents where every transaction has a specific agent

My question is:

I want to put a field on Agents that calculate automatically the number of transaction of the related agent

I know i can use Computed Field so i put field on agents and name it "Total Transactions" and go to odoo studio and trying to put in the compute field the rule without any chance

can somebody guide me how can i do this or maybe give me an example similar to this situation

Thanks

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

Hi,
if you have reference to agent inside the transaction model, then easily you can get it using compute field.

See:  How To Add Compute Field From User Interface In Odoo



Thanks

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

Hello Niyas,

Thank you for your quick answer

So i put in compute this code

but i always get 0 even after adding transactions for a specific agent, could you please look at the code and tell me if I'm doing anything wrong

Thanks

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มิ.ย. 25
15050
3
เม.ย. 25
5120
1
ม.ค. 24
1607
1
ก.ค. 22
2050
4
มี.ค. 24
10859