On 19/05/11 18:50 +0200, Mathias Behrle wrote: > * Betr.: " [tryton-dev] About dropping values from ir.model.data" (Thu, 19 May > 2011 16:05:00 +0200): > > > I'm working on improving the XML import. > > I find there is a lot of code that try to detect if a imported record has > > been > > changed since the last import. If it changed then there is no update done. > > This behavior is almost never used because by default every xml record is > > readonly. There is some exceptions: > > > > - ir.lang > > - ir.model.access > > - ir.model.access.field > > - ir.cron > > - stock.location > > - currency.currency > > - product.uom > > > > I think we could drop this feature because it is unuseful and can generate > > issue by wrongly not update a record. And we will be sure to have the same > > data in the database then in the XML. > > > > For the execptions, I think we can manage them with just the noupdate > > attribute. And for the *.access.* models, we can define that we don't allow > > to > > modify the records. > > > > A other benefit of dropping the comparison is that the update will work > > faster > > (I guess) as there will be no more read/compare/write but just write. > > Only reading doesn't create locks on the database.
Indeed there is not really lock on UPDATE but it is more a conflict check. And the update of the database is done by a single process (and normally nobody should access it during it). > As xml data are mostly of > static nature, there could be very few need to update records. Yes, but I think it will take more times to verify if the record needs to be updated than update it anyway. -- Cédric Krier B2CK SPRL Rue de Rotterdam, 4 4000 Liège Belgium Tel: +32 472 54 46 59 Email/Jabber: [email protected] Website: http://www.b2ck.com/
pgpuVjhGVvyEB.pgp
Description: PGP signature
