OpenERP 6.1 development environment in Ubuntu using Eclipse.

          In this blog we will go through some steps required in setting up OpenERP for customization under eclipse in Ubuntu.In my previous blog i have gone through setting up OpenERP for windows.

Version Used:

  OpenERP    :     6.1
  Postgresql   :     9.1
  Eclispe        :     latest in ubuntu repository

Run the following commands from the terminal.

  1) Installs eclipse and its dependencies.
                  sudo apt-get update
                  sudo apt-get install  eclipse 
 
  2)Installs python and its libraries packages required for openerp-server
                sudo apt-get install python python-psycopg2 python-reportlab python-pychart python-pydot 

                 python-egenix-mxdatetime python-lxml python-libxslt1 python-tz python-dateutil python-vobject

                 python-mako python-yaml python-dev python-setuptools python-pybabel

  3)OpenerpERP server uses postgresql database server for its working so,
                 sudo apt-get install python-software-properties
                 sudo add-apt-repository ppa:pitti/postgresql
                 sudo apt-get update
                 sudo apt-get install postgresql-9.1 postgresql-client-9.1 postgresql-contrib-9.1

 
  4)Create a database user for OpenERP in postgresql server, who can create  databases and manipulate them.
                 sudo su postgres
                 createuser <system-user-name> (enter “y” when prompted for super user role)
                 exit

  5)Openerp-server 6.1 requires Werkzeug and Python-openid packages to be installed.
                   wget http://pypi.python.org/packages/source/W/Werkzeug/
                        Werkzeug-0.8.3.tar.gz#md5=12aa03e302ce49da98703938f257347a  (copy the full link)

                   tar -zxvf  Werkzeug-0.8.3.tar.gz
                   cd Werkzeug-0.8.3
                   python setup.py install
                   cd ..

                   wget http://pypi.python.org/packages/source/p/python-openid/
                        python-openid-2.2.5.tar.gz#md5=393f48b162ec29c3de9e2973548ea50d  (copy the full link)

                   tar -zxvf python-openid/python-openid-2.2.5.tar.gz
                   cd python-openid-2.2.5
                   python setup.py install
                   cd ..

  6) Install PyDev plugin in eclipse
            a)help -> Install New Software.
            b)In Install dialog box, Click Add.
            c)Give name ‘pydev’ and type the path. i.e. 
            d)click ok.
            e)select pydev checkbox and follow the steps by clicking finish

   7)Adding python in eclipse can be done by
           a)window -> Preferences
           b)In Preferences dialog box expand pydev from left side tree
           c)click on Interpreter-Python
           d)click new (python interpreter) 
           e)browse and select  “File System–>usr–>bin–>python” and  also give name “python2.6”
           f) click ok then again ok

   8)Download Openerp 6.1 source tarball from,
            http://nightly.openerp.com/6.1/releases/openerp-6.1-1.tar.gz

   9)Extract the tarball downloaded and create a folder Openerp and move the tarball and extract it there, rename it to Openerp-6.1

   10)Switch the workspace folder to created Openerp folder and create a new Pydev project in eclipse named Openerp-6.1.
          New-> project –> Pydev –> Pydev project 
          project name – Openerp-6.1
          check Use default
          Press F5 after creating the project to refresh the workspace.

    11)In Eclipse package explorer, Rename openerp-server in Openerp-6.1 folder to openerp-server.py.
          Right Click on,  openerp-server.py –> Run as –> Python run.

            Openerp web can be accessed from the browser through browser http://localhost:8069.

      Hope this blog might be helpful.

Comments

acai beere: Thanks for sharing your thoughts on zesty beanz. Regards".

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Anonymous says:

    Hi Fahad, great blog. It’s really helpful to openerp newbie like me.
    But I think you need to install Babel

    1. romar says:

      Hi Fahad,
      Great article. I blindly followed the steps, and it worked like a charm… Except for the babel dependency. Another one of your readers has also figured this out.
      I fixed this by installing python-pybabel:
      sudo apt-get install python-pybabel
      Thanks again Fahad.

  2. Openerp newbie says:

    Hi Fahad, I followed your step and successfully set up the eclipse environment for Openerp.
    Bravo!
    By the way, do you know how you set the web access port something other than 8069?
    Thank you.
    Great blogs

    1. fahad says:

      Hi,

      Web access port can be changed by running openerp-server with arguements (–xmlrpc-port=<Any other port value>)
      which can be done in eclipse by creating run configuration and passing the arguement  (–xmlrpc-port=<Any other port value>).

  3. romar says:

    Great blog…. Thanks Fahad for your handy tutorials…. They are more useful than the help I got from the official OpenERP forum!

  4. Jay Maniar says:

    Hello Dear,
    Thanks for writing the such an important & nice blog for installation. I have followed the steps you have mentioned in this blog. But I am getting the following error.
    Error response
    Error code 404.
    Message: Path not found: /.
    Error code explanation: 404 = Nothing matches the given URI.
    Thanks in advance.

    1. fahad says:

      Hi,

      Could you please check the openerp-server log,it  might be logged if something gone wrong.

       

      Regards,
      fahad

  5. Asfak Balooch says:

    AA, Great Post, Going to follow this up soon… 🙂 KH.

  6. SiriusSols says:

    Thanks for Sharing…

  7. Vincent says:

    I’m trying to connect locally to the database via pgAdmin, but it doesn’t work.
    What user/pass should I use?
    Thanks!

    1. fahad says:

      Hi,

      Please type the following commands in the command line. 

      sudo su postgres
      psql

      Run this query "Alter user <system-user> with password 'admin';" 

      \q to quit and ctrl+d to exit
      now you can login using <system username> as username and password  admin.

       

      Regards,
      Fahad

      1. extra information says:

        HI……………….?

    2. ps vita bundle says:

      Thanks very interesting blog!

  8. Vincent says:

    XML syntax highlight
    Hi Fahad,
    I did not find how to add the syntax higlight for XML files.
    Can you help me on this?
    Thank you again for your great help!
    Vincent

    1. fahad says:

      Hi vincent,

      XML syntax could be highllighted by installing xml editor plugins, which could be installed as follows

      Help –> Install new software –> select (eclipse version name)  Update Site  from the dropdown –> Web, XML, and JAVA EE develpoment — >  Eclipse XML editors and Tools

      check the box and give for install.

      Regards,
      Fahad

      1. zakładanie spółek says:

        I for all time emailed this blog post page to all my associates, for the reason that if like to read it afterward my friends will too.

      2. apartamenty magnolie warszawa says:

        I think the admin of this web site is genuinely working hard in support of his website, since here every information is quality based material.

  9. Mario says:

    Great, it works. Write something about debuging with Eclipse.
    How to use Debug as and Python unit-test.

    1. business says:

      Hi………………….?????? This is a really good post… Must admit that you are amongst the best bloggers I have read… Thanks…..?

    2. kamas facile says:

      Interesting blog! Is your theme custom made or did you download it from somewhere? A theme like yours with a few simple tweeks would really make my blog jump out. Please let me know where you got your theme. Thanks

      1. How To Cure Derealization says:

        I'm curious to find out what blog system you are working with? I'm experiencing some small security problems with my latest site and I'd like to find something more secure. Do you have any recommendations?

    3. acai beere says:

      Thanks for sharing your thoughts on zesty beanz. Regards

  10. Donatas says:

    Works nicely on CentOS 6 x86_64 with XFCE desktop. Here is the link to Fedora 16/17 installation guide. With little adjustments (mainly for PostgreSQL 9.1 installation) it can be used for CentOS 6 too. CentOS 5 is not worth trying. Hope this will help to someone.

  11. This is a lovely post and very helpful; thanks!
    But, I’m a little confused. Why would the Eclipse run catch a breakpoint from my LIVE code?
    I have the OpenERP source setup under workspace as Eclipse likes for DEVelopment and I have another instance of OpenERP installed in the normal /usr/lib/pymodules/python2.7/openerp LIVE location. I turn off my LIVE instance with “service openerp stop” then run the DEV instance via Eclipse. Everything seems to be working fine until I encounter some code that does not exist in the Eclipse instance and catch a pdb.set_trace() breakpoint I’d set in my LIVE code.
    > /usr/lib/pymodules/python2.7/openerp/addons/insurance_report/report/bill_report.py(52)invoice_rows()
    -> res[‘quantity’] = self.formatLang(entry.quantity, digits=self.get_digits(dp=’Account’))
    (Pdb) l
    How did the LIVE code get executed by the Eclipse DEV instance?
    DaleEMoore@gMail.Com

  12. Leland Truong says:

    Whats up very cool site!! Guy .. Beautiful .. Amazing . . I will bookmark your web site and take the feeds also? I am glad to find a lot of useful info here in the submit, we want work out extra strategies in this regard, thanks for sharing. . . . . .

© 2020 Zesty Beanz Pvt Ltd All Rights Reserved.