On 17/03/10 13:55 +0100, Cédric Krier wrote:
> Hi,
> 
> I propose to clean up the on_change functions signature.
> Currently, it is like this:
> 
> def on_change_xxx(self, cursor, user, ids, vals, context=None):
>     pass
> 
> But as on_change could happen on non saved records, the ids list is not
> usable and must never be used because the data from the database doesn't
> match the data in the client. on_change function must only rely on values of
> vals. I made a rapid check of the current module and it seems it is already
> the case. So I propose to change the signature into this:
> 
> def on_change_xxx(self, cursor, user, vals, context=None):
>     pass

Here is the codereview for trytond:
http://codereview.appspot.com/628041

And for tryton:
http://codereview.appspot.com/629041

I don't think it is useful to codereview modules as it is just a replace.

-- 
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/

Attachment: pgpEgnpKl6BmJ.pgp
Description: PGP signature

Reply via email to