Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
1261 Zobrazení

Hi there


when I perform a search read over all the records, I get different results when performing a search read over one record.


Eg when I do a search read over the field 'cumulated_balance' of the model 'account.move.line',


for all the records: 

...

{'id': 21429, 'cumulated_balance': 145.71}, {'id': 21430, 'cumulated_balance': 47.9}, {'id': 21431, 'cumulated_balance': 29.8}, {'id': 21432, 'cumulated_balance': 18.46}, {'id': 21433, 'cumulated_balance': 1.6}, {'id': 21127, 'cumulated_balance': 0.0}, {'id': 21128, 'cumulated_balance': 1.6}...


when I do a search read only for record 21429 (with filter [[['id','=',21429]]]) I get this result:

{'id': 21429,  'cumulated_balance': 97.81}


97.81 is not the same as 145.71


Is this a bug or have I done something wrong?



Avatar
Zrušit
Autor

Thanks for this answer!

I'm happy

Indeed 'cumulated balance' seems view based, depending on the query you're running, and is different than the other fields.

Nejlepší odpověď

Hi,

This is not a bug i believe. The compute function of the field is written as it is. If you see the help message added for the field "Cumulated balance depending on the domain and the order chosen in the view."

This may be a technical field used, so if you need real balance, use the balance field. 

Thanks

Avatar
Zrušit