23 February 2009

The wiki is going to be deleted

As some of us have already noticed, the old wiki links that start with openerp.com are not valid any more. That's easy to solve, the wiki has moved to openobject.com/wiki, the links have to be corrected. The more important thing is that the wiki pages are going to be removed, so take a backup now if you need that content! Some of the wiki pages are copied to doc.openerp.com, some not. It depends on Tiny sprl to decide.

Securing web remote access

Today I had to set up remote access to the test database we are using. Both the GTK client and the Web client can be used over SSL (I didn't try Koo because it's not ported to OpenERP 5 yet). I chose to set up the Web client for two reasons: I've read in some forum posts that it's better for slow connection remote sites and because I needed real security after enabling connections from the wide Internet to my OpenERP server. As the Web client doesn't use SSL on it's own, an Apache server has to be set up with mod_proxy and mod_ssl. A description is in the documentiation. That's not enough! With this all the users are exposed to the Internet so I decided to require a certificate login for the browsers. With that only those can access the OpenERP Web client who received a client certificate from me. For this to work, a few more lines are needed in the apache config:
In the VirtualHost:

SSLCertificateKeyFile path/server.key
SSLCACertificateFile path/ca.crt
SSLVerifyClient require
SSLVerifyDepth 10

And the Proxy section:

Order deny,allow
Allow from all

Of course, the self-signed certificate authority, the server key and the client keys are all have to be set up correctly, that's a little more difficult...

The new wizards: osv_memory

With v5 a new wizard solution has appeared in OpenERP, the osv_memory objects. The good thing about them is that they behave like the other osv objects so we don't have to learn new tricks to use them. A good introduction can be found in this forum topic, in Fabien's post. The bad thing is that they also have some tricks and those are not documented. If you search the forums you'll find mostly questions not answers. In the source code, most of the wizards are still the old wizard.interface type, the new osv_memories are mainly used for module installation configuration dialogs. Despite these problems I'll stay with osv_memory and hopefully I'll never have to learn the old way:)

18 February 2009

5.0 branches created today

This morning the new and long awaited 5.0 branches have appeared on launchpad. But it looks like the addons doesn't have a new branch yet. Take a look! I'm thinking of staying with the trunk, maybe the changes in the next version won't be so radical.

10 February 2009

Function calculated fields with stored values

Function fields which store the calculations results are important to make function fields fast enough not only with test data but also with bigger databases. In v5 the recalculation of stored functions can be triggered by the changes (write, create) in other objects and that makes them really useful.
There's an example in account.invoice where the fields amount_untaxed, amount_tax and amount_total are computed by the same function, _amount_all. An shortened example:
'amount_total': fields.function(_amount_all, method=True, digits=(16,2), string='Total',
'account.invoice.line': (_get_invoice_line, None, 20),
This means that if an account.invoice.line changes, _get_invoice_line is invoked with the line's id. _get_invoice_line has to return an id of the main object, account.invoice. _amount_all will receive that id and compute the value to be stored in the field.

09 February 2009

OpenERP vs SQL-Ledger

Now that OpenERP 5 is out a new webpage was launched where ERP solutions are compared. This gave me the thought to write about my own experience. As a developer and maintainer of a heavily customized SQL-Ledger/Lx-Office hybrid I can say that a comparison is not really possible. OpenERP is so much better that they are not in the same category... Now I can develop so smart and complex modules that earlier I could only dream about;) And the really strange is that these complex modules start working in a reasonably short time.

03 February 2009

A release is coming

OpenERP 5.0 seems to be very close. This week only bugfixes and minor improvements were committed in trunk.