On 11/10/09 18:18 -0700, Salim wrote: > > Hi, > I have one question regarding storing a function field on database. > how could i do that ? > Am not talking a bout writing in a function field but persist its > content on the database. is there a argument like (store=True) for > instance ?
There is no strore=True because: - if it is stored, it is no more a function field :-) - implementing this (like OpenERP) make things more difficult and increase the bug probability (desynchronisation of data). If there is a bug in the mecanism, you don't know which data needs to be recomputed. - it needs an mecanism to force the re-computation of function field that needs to run on every write/create and looks to every fields if it needs to recompute. The way OpenERP handles this is not easy to override. And finally, I find it is simpler to create a real field and update it when needed by overriding the create and write functions of each models that are linked to the field computation. PS: this kind of discussion should go on tryton-dev. -- Cédric Krier B2CK SPRL Rue de Rotterdam, 4 4000 Liège Belgium Tel: +32 472 54 46 59 Email: [email protected] Jabber: [email protected] Website: http://www.b2ck.com/
pgp0BT1LcyvXy.pgp
Description: PGP signature
