← Back to team overview

openerp-community team mailing list archive

Re: Class or class_obj


I agree.

In Object Oriented Programming, an object is an instance of a class, not
the class itself.
Since these are relational models, _model makes more sense to me.

I also like _pool as it is clear that it comes from self.pool (in v7).
There's also _registry or _reg.

Anyway, _obj doesn't make a lot of sense to me, but if it's our
convention I won't make a fuss. Until it is, though, I won't be changing
my naming convention and won't consider it in my reviews.

+1 for creating a convention and posting it on

Le 2014-12-02 07:10, Leonardo "LeartS" Donelli a écrit :
> Sorry, I thought I mentioned it: I'm not for using `_obj` at all!
> Personally I'm for the `_model` suffix. It's the most clear and
> explicit, it's often used by Odoo too so it doesn't clash with their
> code, and is correct by PEP8 standards.
> It's only 2 letters more than _obj!
> _______________________________________________
> Mailing list: https://launchpad.net/~openerp-community
> Post to     : openerp-community@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openerp-community
> More help   : https://help.launchpad.net/ListHelp

Attachment: signature.asc
Description: OpenPGP digital signature

Follow ups