Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
2892 Näkymät

Hi,

I am working on an agricultural project and have one model that represents all the zones where I have planted a crop and a second model that represents daily harvests data, connected by a many2many relationship.

The idea being that every day, an employee on each zone harvests the crop and inputs the amount harvested for that day in that zone.

When displaying the Zones in a table, I would like to see the sum of all the harvested amounts for that zone (i.e. the sum of the Kg_Harvested field in the x_harvests model).

I am using the cloud version.

Avatar
Hylkää
Paras vastaus

You will need to define a computed field in the Zones model that calculates the sum of the Kg_Harvested field in the x_harvests model corresponding to that record.

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
syysk. 21
8610
1
helmik. 16
10759
1
helmik. 24
1960
0
heinäk. 24
3000
0
heinäk. 22
60