> On Wednesday 9 June 2010, Mike Evans wrote: >> However the >> business objects do not seem to be loaded/saved so when session.save() is >> called all the business data, customers etc., are lost. It doesn't >> matter if I use the mysql or xml backend. Any thoughts?
I was actually working on this yesterday after the other patches. Continuing today. I'm pretty sure the folks who responded a few months back had it right, inadequate modules are being loaded or inadequate gnucash init functions are being called in order to allow either the load or save of business objects to work correctly. Geert Janssens wrote: > This is because noone created python bindings for the business objects so > far. > As a result, the python bindings will ignore anything business related, Lack of bindings is different from lack of adequate data load/save. The existence of bindings or not determines what parts of the api are accessible to the end-user via python; the amount of exposure doesn't change what happens when the GnuCash C code takes over during load/save. (which is where we think data is lost due to inadequate initialization by the modules) This situation isn't a matter of lack of API exposure; that would be a feature request -- this business data loss stuff is a bindings bug. I would of noticed it sooner if a bug report had been filed against component Python Bindings. There is actually already committed a first start on the bindings side. You can do >>> from gnucash.gnucash_business import Customer, Employee, Vendor, \ Address, BillTerm and everything low level from guid.h, gnc-lot.h, gncCustomer.h, gncEmployee.h, gncVendor.h, gncAddress.h, gncBillTerm.h is available via from gnucash.gnucash_core_c import whatever or from gnucash._gnucash_core_c import whatever and can play with those a bit at runtime. Back to bug killing. Mark _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel