Friday, September 19, 2014

This Song have given me more strength to move on in my life. .



भूल जा ..जो हुआ उसे ..भूल जा.. 
------------------------------------------------------------------------------------------------------------

इन आंसू से किसको 
क्या हुआ हासिल 

माना कहना है आसन 
निभाना है मुशकिल 
फिर भी ऐ यार मेरे 
सुनले मेरी इल्तेजा 

भूल जा जो हुआ उसे 
भूल जा..
है क़सम तुझे मुस्कुरा 
खुद को यूँ ना दे तू सज़ा 
उन यादों को तू भूल जा..

वो तो नहीं था तेरे (मेरे) वफाओं के क़ाबिल 
जाने क्या सोचकर 
तूने (मैने) दे दिया अपना दिल 
इस बार दिल का सौदा 
करना (करूँगी ) ना यूँ बेवजह 

भूल जा जो हुआ उसे 
भूल जा..
है क़सम तुझे मुस्कुरा 
खुद को यूँ ना दे तू सज़ा 
उन यादों को तू भूल जा..



तेरी (मेरी) ज़िन्दगी तेरी (मेरी) है 
किसी की अमानत नहीं 
जब चाहे तोड़ दे 
एक ऐसी इमारत नहीं 
इस बार दिल का सौदा 
करना(करूँगी ) ना यूँ बेवजह 


भूल जा जो हुआ उसे 
भूल जा..
है क़सम तुझे मुस्कुरा 
खुद को यूँ ना दे तू सज़ा 
उन यादों को तू भूल जा..

है क़सम तुझे मुस्कुरा
खुद को यूँ ना दे तू सज़ा 
उन यादों को तू भूल जा
ना ना ना ना भूल जा 
ना ना ना ना मुस्कुरा 
खुद को यूँ ना दे तू सज़ा 
उन यादों को तू भूल जा

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thursday, September 11, 2014

Automating OpenERP Startup and Shutdown

Automating OpenERP Startup and Shutdown



After successful installation of openERP7.0 following instructions on http://ujwalafossist.blogspot.in/2014/09/install-openerp-7-on-ubuntu-1204.html

If You want to automate the process of OpenERP server.

If each step from 1 to 8 at  http://ujwalafossist.blogspot.in/2014/09/install-openerp-7-on-ubuntu-1204.html seems to be working OK, the final step is make the script start and stop automatically with the Ubuntu Server. To do this type:

sudo update-rc.d openerp-server defaults

You can now try rebooting your server if you like. OpenERP should be running by the time you log back in.

If you type :
ps aux | grep openerp

you should see a line similar to this:

openerp   3943  0.0  0.2 475308  7948 ?  Sl   10:40   0:04 python /opt/openerp/server/openerp-server -c /etc/openerp-server.conf


Which shows that the server is running. And you can check the logfile or visit the server from your web browser too.

******************************************************

Thanks
Ujwala H. Pawade.

!!!! Freedom Matters Not The Cost !!!! 

Install OpenERP 7 on Ubuntu 12.04

Install OpenERP 7.0 on Ubuntu 12.04

OpenERP is an awesome ERP solution available in the open source world.

Following are the simple and easy steps to install OpenERP 7.0 in your ubuntu 12.04 OS.

1.Create OpenERP User to run the OpenERP Server .

Creating user called openerp to run the server. This user is a system user.

sudo adduser --system --home=/opt/openerp --group openerp

2. Install and configure the database server i.e. PostgreSQL

The next step is to install and configure the database server. Openerp is using PostgreSQL as the database. So just install and configure postgresql database on your system.

sudo apt-get install postgresql

Then configure the OpenERP user on postgres:

First login to the postgres user so we have the necessary privileges to configure the database.

sudo su - postgres

Now create a new database user. This is so OpenERP has access rights to connect to PostgreSQL and to create and drop databases. Remember what your choice of password is here; you will need it later on:
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp
Enter password for new role: ********
Enter it again: ********
Finally exit from the postgres user account:
exit

3. Install the necessary Python libraries for the server

Now install necessary python dependencies and libraries for running the Open ERP Server.

In Ubuntu terminal type or copy-paste :

sudo apt-get install python-dateutil python-docutils python-feedparser python-gdata \
python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid \
python-psycopg2 python-psutil python-pybabel python-pychart python-pydot python-pyparsing \
python-reportlab python-simplejson python-tz python-unittest2 python-vatnumber python-vobject \
python-webdav python-werkzeug python-xlwt python-yaml python-zsi


With that done, all the dependencies for installing OpenERP 7.0 are now satisfied (note that there are some new packages required since 6.1). It take some time to parse all the dependencies and installing all these packages.


4. Install the OpenERP server


Now just download the latest Open ERP Source Tarball from the official website. i.e. http://nightly.openerp.com/7.0/nightly/ providing all the files. May be this will change on future. On src just download the latest tar ball.

Here I am using a wget command to download that tarball. You can point your browser and download the files.

sudo wget http://nightly.openerp.com/7.0/nightly/src/openerp-7.0-latest.tar.gz

Now install the code where we need it: cd to the /opt/openerp/ directory and extract the tarball there.

cd /opt/openerp
sudo tar -xvf ~/openerp-7.0-latest.tar.gz

Next we need to change the ownership of all the the files to the OpenERP user and group we created earlier.

sudo chown -R openerp: *

The purpose of doing this is to copy the server directory to something with a simpler name so that the configuration files and boot scripts don’t need constant editing.  when it comes to upgrading, it seems to make more sense to just keep a copy of the files in place and then overwrite them with the new code. This way you keep any custom or user-installed modules and reports etc. all in the right place.

sudo cp -a openerp-7.0 server

That’s the OpenERP server software installed. The last steps to a working system is to set up the configuration file and associated boot script so OpenERP starts and stops automatically when the server itself stops and starts.

5. Configuring the OpenERP application

Simply copy the default configuration file for the server (/opt/openerp/server/install/) to /etc/  and change it’s ownership and permissions:

sudo cp /opt/openerp/server/install/openerp-server.conf /etc/
sudo chown openerp: /etc/openerp-server.conf
sudo chmod 640 /etc/openerp-server.conf

The above commands make the file owned and writable only by the openerp user and group and only readable by openerp and root.

To allow the OpenERP server to run initially, change  linedb_password = False to the same password used in step 2. Use any text editor here. I have used nano, e.g.

sudo nano /etc/openerp-server.conf

OR

vi /etc/openerp-server.conf
One other line we might as well add to the configuration file now, is to tell OpenERP where to write its log file. Add the following line to the openerp-server.conf file:

sudo su - openerp -s /bin/bash

/opt/openerp/server/openerp-server

If it says OpenERP is running and waiting for connections then you are all set.

6. Installing the boot script

For the final step we need to install a script which will be used to start-up and shut down the server automatically and also run the application as the correct user. 

Similar to the configuration file, you need to either copy it or paste the contents of this script to a file in /etc/init.d/ and call it openerp-server. Once it is in the right place you will need to make it executable and owned by root:

sudo chmod 755 /etc/init.d/openerp-server
sudo chown root: /etc/init.d/openerp-server

In the configuration file there is an entry for the server’s log file. We need to create that directory first so that the server has somewhere to log to and also we must make it writable by the openerp user:

sudo mkdir /var/log/openerp
sudo chown openerp:root /var/log/openerp

 7. Testing the server

To start the OpenERP server type:

sudo /etc/init.d/openerp-server start

You should now be able to view the logfile and see that the server has started.

less /var/log/openerp/openerp-server.log

If there are any problems starting the server you need to go back and check. 

If the log file looks OK, now point your web browser at the domain or IP address of your OpenERP server (or localhost if you are on the same machine i.e. local machine) and use port 8069. The url will look something like this:

http://IP_or_domain.com:8069 (In case of remote access)
http://localhost:8069 (In case of local access)

TTo make sure the server stops properly type:

sudo /etc/init.d/openerp-server stop


*********************************************************************************

Thanks
Ujwala H. Pawade.

!!!! Freedom Matters Not The Cost !!!!!

Set up OpenERP development enviroment in Eclipse IDE

Set up OpenERP development enviroment in Eclipse IDE



1. Download Eclipse IDE latest version and install pythonDev Plugin and Bazaar Plugin

2. Install python and postgresql

sudo apt-get install python
sudo apt-get install postgresql

3. Install python related packages to run openerp

sudo apt-get install python-dateutil python-docutils python-feedparser python-gdata python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid python-psycopg2 python-psutil python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-unittest2 python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi

4. Download source from remote repository to local repository, may require public sshkey in launchpad account to download.

erp1@lenovo-thinkvision:~/bzr-repo/openerp$ bzr branch lp:openobject-server/7.0 server
erp1@lenovo-thinkvision:~/bzr-repo/openerp$ bzr branch lp:openerp-web/7.0 web
erp1@lenovo-thinkvision:~/bzr-repo/openerp$ bzr branch lp:openobject-addons/7.0 addons


5. Branch the local repository to your workspace.

erp1@lenovo-thinkvision:~/workspace/openerp$ bzr branch ~/bzr-repo/openerp/server/ server
erp1@lenovo-thinkvision:~/workspace/openerp$ bzr branch ~/bzr-repo/openerp/web/ web
erp1@lenovo-thinkvision:~/workspace/openerp$ bzr branch ~/bzr-repo/openerp/addons/ addons


6. Create a new database user. This is so OpenERP has access rights to connect to PostgreSQL and to create and drop databases. Remember what your choice of password is here, you will need it later on:

$ sudo su - postgres

createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp
Enter password for new role: ********
Enter it again: ********

Finally exit from the postgres user account:

exit

7. Create pythonDev project from eclipse for server, web and addon.

8. Create openerp-server.conf file in server directory with following content 

[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = localhost
db_port = 5432
db_user = openerp
db_password = openerppwd
addons_path = ../web/addons,../addons
log_level = info
xmlrpc_port = 8069

9. Run server from commandline $ python openerp-server --config=openerp-server.conf

or 

create run configuration in eclipse.

Name: server openerp-server
Project: server
Main Module: ${workspace_loc:server/openerp-server}
Program Argument: --config=openerp-server.conf

10. Browse http://localhost:8069


*********************************************************************************
Thanks,
Ujwala H. Pawade.
!!!! Freedom Matters Not The Cost !!!!

Wednesday, September 10, 2014

To get OpenERP via bazaar

To get OpenERP via bazaar


To get OpenERP via bazaar do the following on a fresh install, assuming a user named openerp owns the files on your server:

1. Install bazaar from the ubuntu server repository using following command:
sudo apt-get install bzr

2. Login as a supersuser openerp:
sudo su - openerp

This will su your current terminal login to the openerp user

3. Change directory to your development directory:

cd /opt/openerp/ 

Note: I usually prefer development of openerp in opt.

4. Enter following commands to fetch the repositories (server, addons, web) of openerp

bzr branch lp:openobject-server/7.0 server
bzr branch lp:openobject-addons/7.0 addons
bzr branch lp:openerp-web/7.0 web


*********************************************************************************

Thanks
Ujwala H. Pawade

!!!!!! Freedom Matters Not The Cost !!!!!!