OpenERP v6.1 Tweak #2 – Minify Webclient JS

Why OpenERP v6.1 web client isn’t shipped with minified javascripts is probably the first question I asked myself when I first dig the source codes. But thanks to the modular architecture of OpenERP, we can do that quite easily to add a little boost to the web client without patching a single line.

  1. Install Java if it is not already installed
  2. Install minify
    • $ pip install minify
  3. Run the following script
  4. Rename lib
    • $ mv openerp/addons/web/static/lib openerp/addons/web/static/lib.ori
  5. Create symlink lib to lib.min
    • $ ln -sf openerp/addons/web/static/lib.min openerp/addons/web/static/lib
  6. Reload server

Continue reading

OpenERP v6.1 on Nginx and Gunicorn

There are many examples on how to deploy OpenERP with Nginx and Apache2 + mod_wsgi over the Internet. My personal preference is to deploy OpenERP with Nginx and Gunicorn. Gunicorn is a Python WSGI compliant HTTP server that makes a very good case for a deployment on multi-core server. While you may not get much performance boost from Nginx and Gunicorn if your server is a single core server, Gunicorn still uses far less memory compared to Apache2 + mod_wsgi, which is important if you host multiple projects on the same server. OpenERP has a relevant write-up that should serve as a good reference.

Without much ado, here’s my Nginx conf file.
Continue reading

OpenERP v6.1 Tweak #1 – Gzip “application/javascript”

I have been following OpenERP for a few years now but never had the opportunity to put it to good use.. until now. At the time of this writing, v7 is out with tremendous improvements to the web UI. But I am stuck with v6.1 for reasons that I prefer to keep to myself.

This post is the first post of a series of tweaks I learned for a useful deployment.

So here’s the first tweak:  Continue reading

Local vimrc

No one tool is always right for every job; neither there is one configuration always works for every project. That’s why Django developers, me included, like to tweak local development environment (such as turning on debug mode temporarily) using local_settings.py instead of meddling the project-wide settings.py. Continue reading

Getting ZTE MF190 HSUPA USB Stick to work in Ubuntu

I subscribed to Celcom Broadband whilst waiting for my fixed broadband to be fixed. I’m given a HSUPA USB stick by ZTE, model MF190. While the modem provided by Maxis (of which model I can’t remember) works out of the box in Ubuntu, this MF190 doesn’t.

Like most HSUPA USB sticks, MF190 double as a mass storage device. Windows driver and tools can be located and installed from here. After which, it will switch to modem mode. In Ubuntu, this process is done automatically (via usb_modeswitch and udev). However, MF190 is not recognized. Continue reading