← Back to team overview

openerp-expert-framework team mailing list archive

Re: object namespaces

 

Well, I hope Python can at least do what we do in Ruby for OOOR, we already
do such a thing. Instead of naming objects sale.order, we name them
SaleOrder, like a regular class name and it's available in the general
scope. You can take a quick look to the API: http://github.com/rvalyi/ooor

In any case would be nice to have such a thing, this would have been if
OpenERP was a nice general framework... Well, it's not it's a decent ERP
framework only. I don't thing Tiny is able to do such a change now, at least
not in 5.2; but it's not too critical either compared to some other
points...

Raphaël Valyi
http://www.akretion.com


On Thu, Jan 14, 2010 at 2:28 PM, P. Christeas <xrg@xxxxxxxxx> wrote:

> On Thursday 14 January 2010, David Janssens wrote:
> > Related to the 'removing context' issue:
> > In a later version, would it be possible to replace all the
> > self.pool.get("xxx").blabla(...) by  just xxx.blabla(...) ?
> > I mean using regular python object namespaces rather than pool.get?
> > It would reduce the required typing...
> >
> It could be much harder than it originally sounds.
> Consider that most names don't just have one part, but dotted notation:
> self.pool.get('account.invoice')
> Then, we should create an intermediate 'account' object that would resolve
> the
> 'invoice' one. When it comes to the structuring of that dotted notation
> (does
> 'invoice' belong to the 'account' module? ), things may get even more
> messy..
>
>
>
>
> _______________________________________________
> 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
>

References