← Back to team overview

openerp-dev team mailing list archive

Updated API: fields.function, osv loading

 

Hi everyone,

A quick heads-up to let you know about some recent and important changes
to the OpenERP framework:

1) fields.function() does not take a "method" parameter anymore [1]. It
was useless and every field was passing method=True. It is possible to
pass a normal function too, it simply needs to have the proper signature
(see the docstring). Don't forget to run 'bzr pull' on the server,
otherwise your addons will break.
And please do not use the "method" parameter anymore!

2) There is no need to call the constructor of each osv object anymore
after defining it. This is now done automagically by the osv
metaclass[2], so you can save this line for every osv object you
declare. Calling the constructor will not hurt, but it's unnecessary.

3) You don't need to split osv classes when there are circular
references, such as users <-> groups. Modules are now loaded in several
passes to resolve the dependencies [2].

Thanks to Vo Minh Thu (VMT) for items 2 and 3!


PS: please double-check that all your developer colleagues are
subscribed to this mailing-list, otherwise ask them to enable their
subscription via http://launchpad.net/people/+me/+editemails


[1] Server rev 3495 revid
odo@xxxxxxxxxxx-20110701232328-flgxulxva70vnyxr and addons rev 4844
revid odo@xxxxxxxxxxx-20110701234124-a61zl0idvdfz3hyb
[2] Both changes come with server rev 3464 revid:
vmt@xxxxxxxxxxx-20110615160123-7bk8u94y916mdpkj