← Back to team overview

openerp-expert-framework team mailing list archive

Re: Removing context

 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 14/01/10 15:56, Albert Cervera i Areny wrote:
> A Dijous, 14 de gener de 2010, Albert Cervera i Areny va escriure:
>> A Dijous, 14 de gener de 2010, Christophe Simonis va escriure:
>>>> I know that sounds like a big change but I can't avoid thinking on how
>>>> many  bug reports we would have avoided (and will avoid) just because
>>>> developers keep forgeting passing context argument.
>>>>
>>>> It's true that there're lots of modules out there but most of them
>>>> could be  updated with simple regular expressions.
>>>>
>>>> Of course, it also provides cleaner code and avoids typing a little bit
>>>> of  code :P
>>>
>>> I think it's a great idea, but that also mean that the xmlrpc and netrpc
>>> layers have to be rewritten...
>>
>> Are you sure? We implemented Pyro and not only it is very little code but
>>  also doesn't handle context anywhere...
>>
> 
> 
Yes, I am.
The signature of the *execute* method is

  def execute(self, db, uid, passwd, object, method, *args)

How will you extract the context from *args ?

- -- 
Simonis Christophe
Quality & Support Manager
Open ERP - Tiny SPRL
Chaussée de Namur, 40
B-1367 Gérompont
Tel: +32.81.81.37.00
Web: http://openerp.com
Blog: http://christophe-simonis-at-tiny.blogspot.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktPSvwACgkQYeXc6dw+UFpFpQCfRELI93rpUDCjJ3k4wzIqJe29
gnMAoIFtknZPQ/0+3Z8Ci44/dU9DlH5j
=E3Z1
-----END PGP SIGNATURE-----
begin:vcard
fn:Christophe Simonis
n:Simonis;Christophe
org:Tiny SPRL
adr;quoted-printable;quoted-printable:;;Chauss=C3=A9e de Namur 40;Grand Rosi=C3=A8re;;1367;Belgium
email;internet:chs@xxxxxxxxxxx
title:Quality & Support Manager
tel;work:(+32) 81.81.37.00
tel;fax:(+32) 81.73.35.01
x-mozilla-html:FALSE
url:http://opener.com
version:2.1
end:vcard


Follow ups

References