On 28/09/10 16:13 +0200, Paul J Stevens wrote: > On 09/28/2010 01:52 PM, "Cédric Krier" <[email protected]>" wrote: > > > It comes from the _default_on_change on server side [1]. > > The method doesn't respect the with_rec_name parameter of the default_get > > [2]. > > > > [1] > > http://hg.tryton.org/trytond/file/32a3cbee4bdd/trytond/model/model.py#l591 > > [2] > > http://hg.tryton.org/trytond/file/32a3cbee4bdd/trytond/model/model.py#l493 > > I'll take your word for it, but I don't see it there. I can't see past > the voodoo going on there. > > Attached patch for account_invoice did it for me :-(
This is not right because on_change method must return '.rec_name' of many2one to prevent too much queries from the client. It is the _default_on_change method that must not add '.rec_name' to default_get if not asked. PS: Please follow http://code.google.com/p/tryton/wiki/HowtoContribute -- 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/
pgpqICcX4sa8M.pgp
Description: PGP signature
