Showing posts with label orm. Show all posts
Showing posts with label orm. Show all posts

Tuesday, April 06, 2010

Back to OpenERP ... programming

So, I just added a wizard for automating membership renewal.

Finding the right company to renew and the right address is a bit tricky with the Open ERP so called ORM.

So the solution is to use the SQL pass-trough alternative: cr.execute.

I did and it works pretty well. On the other side, each of these calls is a short- circuit in the programming model, heritance and ... security checking. Don't take me wrong on this, but let's admit this is a technical insider concern...

So how much does this affect the code base ?

chanon@batman:~/openerp-REG/openerp/addons$ ls -l | wc -l
114
chanon@batman:~/openerp-REG/openerp/addons$ find . -name *.py -exec grep cr.execute {} \; | wc -l
579




So without doing many math, I think a good part of the entire code base is concerned.

I am not jumping on this right away, but I need to dig more...

Sunday, May 31, 2009

Back to Ubuntu - Installed OpenERP

Well, my experience with OpenSuse are over. There are basically 3 reasons.

1- performance. This thing is slow, slow, slow. My previous Suse 9.2 on a Pentium 4 was fine but with OpenSuse 11.1 it is strictly unusable.

2 - in spite of various attempts. I cannot get a config capable of NFS mounting from my SLES server at boot time.

3 - the repository is not complete as far Python is concerned. Annoying as I am digging into OpenERP a python based software.

So I moved to Ubuntu (8.1). Performance is great, may be faster than my old suse. Server admin : I miss Yast. But I put webmin using the debian package. So far so good.

I installed today OpenERP 5.0.1. Really easy cool setup. I must say my first opinion on Python is relatively negative. I don't link the syntax, the idea of significant indentations repulsed me... But as my coworker remarked, this will at least push me to indent my code (I do - but I am more a vertical developper than an horizontal one :-).

Also I am sure I will regret Java independance and the fact that good python extension are typically written using C or C++. Not talking about my Netbeans ide, my be-loved spring stuff...

However I admit the resulting app in this case is great !

Among the advantage of Python the designer of the app said to me that data structures changes are more simply implemented via python. I can agree. With a typicall Java ORM (JPA or Hibernate), any changes in the DB will turn into endless changes into the code base. So this is not new 'religion' to me, but I will sure look how OpenERP is built and why try to find why this ERP shine while all the Java based products miss elementary functionnalities and are pain in the a.. to setup and use.