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

Hello


I am trying to sum a column in the invoice line module in a field on the invoice module.  I have tried the following formula 


for record in self:

  record['x_studio_field_8kUMr']=(record.x_studio_field_zJdWj).sum() 


I am getting an error saying the x_studio_field_zjdWj is not found.   I assume that the error is due to the field I want to sum is not in the same module as the computed field.  Is there a way to compute the sum of the column in question?

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

you can give attribute

sum="Total"

on XML field.

eg:

<field name="amount" sum="Amount"/>

the sum will be shown in the footer of the tree view


อวตาร
ละทิ้ง

How do I show the label for the sum value??