Hi all

I have spent some time developing my own business/accounting application in 
Python. Now that I have found out about OpenERP, I am considering whether my 
efforts may not be better applied in supporting OpenERP instead. Haven't 
decided yet ...

This is how I approach this situation in my system -

I agree with a previous poster that, for certain tables where you want to 
preserve history, nothing should ever be deleted or updated. Each row must be 
timestamped, and each change must result in a new row with the latest timestamp.

Then, when you want to retrieve an address to print on an invoice, you can say 
something like (pseudo SQL) -

SELECT ADDRESS FROM ADDRESSES WHERE ACCOUNT_NO = [INVOICE_ACCOUNT_NO] AND 
TIMESTAMP <= [INVOICE_TIMESTAMP] ORDER BY_DESC TIMESTAMP LIMIT 1.

You can have an option to use the current address details instead, in which 
case you would omit AND TIMESTAMP <= [INVOICE_TIMESTAMP].

I have tested this concept and it definitely works. However, I cannot vouch for 
its performance with large-scale data. With appropriate indexes, I think it 
should be acceptable.

My 2c

Frank




-------------------- m2f --------------------

--
http://www.openobject.com/forum/viewtopic.php?p=31428#31428

-------------------- m2f --------------------


_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users

Reply via email to