Just a suggestion, but why not try something easy, like:

   - add a date field to your model
   - when saving a record from an entry form, use onvalidation
   - in the onvalidation function, find the previously dated record
   - compare the previous record with the current entries
   - calculate the meter reading 'delta' value and fuel statistics etc and 
   update these fields in your current record

OR

   - Do not save any delta or fuel stats at the time of saving a meter 
   reading record.
   - Simply select the records you require to analyse and then calculate 
   all the extra info with python at the time you need to report the data,


Both of the above are within your capabilities.  

As I said, this is simply a suggestion, but it save time and complexity :)
Best wishes for your project

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/47eae5ff-a662-4ef8-a774-664a9e235c41%40googlegroups.com.

Reply via email to