Tryton - Issues



Title Cache not reusing untaxed_amount in
Priority feature Status resolved
Superseder Nosy List albertca, ced
Type feature request Components account_invoice, purchase, sale
Assigned To ced Keywords

Created on 2012-12-19.01:21:35 by albertca, last changed by ced.

msg13450 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2013-06-01.00:05:27
Fixed with rev a1d6905f2eb1, rev 954486219890 and rev 74c8aaba142d
msg13423 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2013-05-23.15:05:45
Please test patch at review897002
msg12230 (view) Author: [hidden] (albertca) (Tryton committer) (Tryton translator) Date: 2012-12-22.22:06:21
Forget it. Of course, there's no easy way of invalidating the cache for function 
msg12229 (view) Author: [hidden] (albertca) (Tryton committer) (Tryton translator) Date: 2012-12-22.17:58:33
Wouldn't it make sense to have a cache on function and property fields, for 
example? Probably, in most cases it takes much more time to execute one function 
field than to read from the database a value.
msg12223 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2012-12-19.11:05:17
Indeed the code could be improved by merging the 3 getter methods.
msg12222 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2012-12-19.10:19:39
It is not a bug. There is no cache on read.
msg12221 (view) Author: [hidden] (albertca) (Tryton committer) (Tryton translator) Date: 2012-12-19.01:21:34
Not sure if this is a bug, but it seems to me it is.

Simply opening the list view of will read untaxed_amount and 
total_amount, but total_amount uses untaxed_amount. I expect 
get_untaxed_amount() to be called only once and the value to be cached on the 
second "read", but it isn't.

This can be easily checked by adding a 'print' statement in get_untaxed_amount() 
and opening the list of sales with only a sale order in it.
Date User Action Args
2013-06-01 00:05:40cedsetstatus: testing -> resolved
messages: + msg13450
2013-05-23 15:05:47cedsetstatus: chatting -> testing
assignedto: ced
component: + account_invoice, purchase, sale
messages: + msg13423
2012-12-30 10:57:31cedsetassignedto: ced -> (no value)
2012-12-22 22:06:22albertcasetmessages: + msg12230
2012-12-22 17:58:34albertcasetmessages: + msg12229
2012-12-19 11:05:17cedsetstatus: invalid -> chatting
messages: + msg12223
2012-12-19 10:19:39cedsetstatus: chatting -> invalid
assignedto: ced
messages: + msg12222
nosy: + ced
2012-12-19 01:21:35albertcacreate

Showing 10 items. Show all history (warning: this could be VERY long)