openerp-expert-framework team mailing list archive
-
openerp-expert-framework team
-
Mailing list archive
-
Message #00539
Updated OpenERP API in trunk: fields.function, osv loading
Hi everyone,
A quick heads-up to let you know about some recent and important changes
to the OpenERP API in the trunk branch (future 6.1):
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 the trunk addons will not work anymore.
And please do not use the "method" parameter anymore in trunk! (it's
ignored, though, so it's backwards compatible)
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!
[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
Follow ups