BeezNest Open-Source specialists

November 17, 2008

Fixing WebCalendar 1.2.0 + iCal, in French

Filed under: OSS Solutions, Tech Crunch — ywarnier @ 4:03 pm
Tags:

While trying to debug WebCalendar 1.2.0 a little, combined with iCal and using French, we found a series of things that might be worth reporting in one go…

First of all, some weird warning messages appear reporting that mb_language() did not understand “French” as a supported language. Basically, the php documentation on mb_language() is quite clear: this function only supports “Japanese”, “ja”, “English”, “en” and “uni” as languages, and is mostly used in the context of e-mails to translate fonts from one language to another. This is fixed by adding a @ in front of the only (I think) call to mb_language() in the WebCalendar code. There is a suggested patch for this in the SourceForge bugtracker for WebCalendar, and it should be inside 1.3.0 (still to be published).

Second, a previous upgrade process seemed to have broken the database permissions (we probably upgraded as root and some database was created during the upgrade, making it impossible for the “webcalendar” user to see it). This is not a WebCalendar bug, but mentioning it here might help some of you. A quick fix to this is to grant all privileges again on the webcalendar database to the webcalendar user, like so: GRANT ALL PRIVILEGES ON DATABASE webcalendar TO webcalendar; (while connected as the postgres user).

Third, while using French in non-unicode mode, it appears that the French language file is missing the “charset” variable, which then makes it impossible for the system to determine which charset to use. This effectively prevents the title element of the page to be displayed correctly. A quick (and good) fix is to edit the French.txt file and add “ISO-8859-15″ as the charset term’s value.

This being said, many problems remain with the iCal client, and this could not be considered by us as a satisfactory solution in comparison to Google Calendars.

November 3, 2008

Installing a new chart of accounts in OpenERP 4.2.3

Filed under: Tech Crunch — ywarnier @ 8:36 pm
Tags: ,

I’ve been trying for some time to get a new chart of accounts for Peru into the OpenERP system, and I was frequently confronted to an ugly error saying:

(‘Error ! You can not create recursive accounts.’, ‘parent_id’)

The annoying thing being that it didn’t actually tell me which parent_id that was. Considering the size of an XML chart of accounts, it proved very difficult (if not impossible) to find the actual error, so I decided to drop the idea and continue integrating peruvian things into OpenERP on other aspects.

Today though, preparing a demo for a prospect here, I realised that the error was, in fact, detailed in the live logging of my OpenERP server. It was saying something like this:

Mon, 03 Nov 2008 13:22:57 INFO:init:
<record id=”chart32″ model=”account.account”>
<field name=”code”>322</field>
<field eval=”False” name=”reconcile”/>
<field name=”close_method”>none</field>
<field eval=”[(6, 0, [ref('chart32')])]” name=”parent_id”/>
<field name=”type”>view</field>
<field name=”name”>Edificios y otras construcciones</field>
</record>

…which means that I had an element coded “322″ which was using the same id as another element declared previously (chart32). Knowing this, I just had to fix the XML file (I also realized that I had two repeating entries around that one) and import it again into OpenERP and… tadaaaaa! I now have a running chart of accounts for Peru!

This, though, will only be helpful if you actually start the server by hand and have the logging appear in front of you. Damn, it feels so easy when it’s done.

November 2, 2008

Howto run OpenERP 4.2.3’s latest stable version on Ubuntu

Filed under: Tech Crunch — ywarnier @ 7:50 am
Tags: , ,

Following a little bit on my previous article on how to install OpenERP 4.2.0 on Ubuntu, this is an article on how to install the stable branch (but latest development version of this branch) of OpenERP, in version 4.2.3.

The Launchpad project for OpenERP is here: https://code.launchpad.net/~openerp

So basically, downloading OpenERP 4.2.3 is done, at the time of writing these lines, like this:

$> mkdir ~/openerp/stable/4.2 -p
$> cd ~/openerp/stable/4.2
$> bzr clone lp:~openerp/openobject-server/4.2 server
$> bzr clone lp:~openerp/openobject-client/4.2 client
$> bzr clone lp:~openerp/openobject-addons/4.2 addons
$> cd server/bin/addons
$> ln -s ../../../addons/* .

These are the dependencies you might want to check on your system before trying to run the system (for both the client and the server):

sudo apt-get install python python-egenix-mxdatetime python-xml python-lxml python libxml2 python-libxslt1 python-psycopg python-pydot graphviz python-pyparsing python-imaging python-reportlab python-gtk2 python-matplotlib

Starting the server can then be done like this:

cd ..
./tinyerp-server.py –database=ywarnier –db_port=5433

The port might be a problem (trying to connect to port 5432 if PostgreSQL is actually running on port 5432) depending on the version of PostgreSQL you use, and its configuration, so we’re using the port on the command line here.

Starting the client (from a second terminal) is done by getting into the client/bin directory and executing

./tinyerp-client.py

If all goes well, you should be able to start using it straight away.

Downloading the web client is done this way:

$> bzr clone lp:~openerp/openobject-client-web/4.2 client-web

You will probably need python-pkg-resources and python-turbogears

$> sudo apt-get install python-pkg-resources python-setuptools python-kid

$> sudo apt-get install python-turbogears

I am splitting these two lines because apparently installing python-turbogears directly causes a failure in the package configuration sequence.

To start the web client, just get into the client-web/ directory and launch

$> sudo ./start-tinyerp.py

If you still have your server running over there, this should do the trick.

Blog at WordPress.com.