← Back to team overview

openerp-expert-framework team mailing list archive

Re: OpenERP should unify osv function signature

 

I agree it is cumbersome to add the same boilerplate on every OSV method.

Currently, I use a decorator to do the trick. It works well, but it would
be better if the dirty things were done by the framework.

the decorator can be used directly like this:

    @osv_method
    def do_thing(cr, uid, ids, foo, bar, baz=2, context=None):
        pass


Regards,

-- 
Florent



2011/11/25 Nicolas Bessi <nicolas.bessi@xxxxxxxxxxxxxx>

> Hello,
>
> OpenERP should unify osv function signature, if function is public ids
> should be array else function must be private. A decorator at ORM level
> should do the work and transform id into array of ids.
>
> My two ct.
>
> Nicolas
>
>
> --------------------------------------------------------------------
> *Nicolas Bessi *
> Senior ERP consultant
> Business Solution technical manager
>
> Camptocamp SA
>  PSE A
> CH-1015 Lausanne
> http://www.openerp.camptocamp.com
>
> Phone: +41 21 619 10 26
> Office: +41 21 619 10 10
> Fax : +41 21 619 10 00
> --------------------------------------------------------------------
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openerp-expert-framework
> Post to     : openerp-expert-framework@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openerp-expert-framework
> More help   : https://help.launchpad.net/ListHelp
>
>

Attachment: util.py
Description: Binary data


References