How to work with real-time Stock valuation in OpenERP ?

In OpenERP, stock management is completely integrated with the accounts, to give strong coherence between the two systems. The double-entry structure of locations enables a very precise correspondence between stocks and accounts.

Each stock movement also generates a corresponding accounting entry in an accounting journal to ensure that the two systems can stay in permanent synchronization.

How to Configure Accounting Valuation?

We are taking an example of one product as shown in below screen with different sale price and cost price.

Now go to the Accounting tab and select the Real Time (automated) option for Inventory Valuation,

You have to define Stock Input Account, Stock Output Accounts here as shown in below screen.

Now we are creating a sales order having 2 products to sale.

After confirming the sales order, we have to do rest of the process for delivery from warehouse.

Once we complete product delivery process, we will check Journal Entry.

Go to the Journal Entries from Accounting menu and we can see the unposted entry created here in which we can see partner is the same we have selected in our Sales Order.

Here we can see that, the amount considered is the cost price of product Basic PC. As we have selected 2 products in our sales order so journal entries are accordingly in screen.

Now from here, we can post the entries and can perform rest of the stuff which are required for accounting.


How to create Opening Balance for new year in OpenERP?

At the end of a financial year, you will have to transfer the closing balance of current year as an opening balance to the new financial year.

You have to do following steps to achieve this.

First create new financial year (In our example, we are using 2012 as our running fiscal year).

Now create an account for opening balance.

You have to take care before selecting account type more specifically the Deferral Method. It determines whether and how account entries will be transferred to the new financial year. There are following types of deferral methods:

Deferral Method    Action
None               Nothing will be transferred (typically P&L accounts)
Balance            Account balance will be transferred 
                   (typically Balance Sheet accounts)
Detail             All entries are transferred, also reconciled entries
Unreconciled       Only entries that are not reconciled on the first day 
                   of the new financial year will be transferred 
                   (typically receivable and payable)

Define journal for opening balance.

Make entries for opening balance in that journal.

It will automatically generate the opening entries based on information provided in following wizard.

In the wizard, enter the financial year for which you want to transfer the balances (Fiscal Year to close). Select the New Fiscal Year (the year in which you want to generate the opening entry). You have to select the journal and the period to post the opening entries. Enter description for the opening entry such as Opening Entry for year YYYY. After that click on the Create button to generate the opening entry according to the settings defined.

Just look at the draft opening entry that has been generated. Open record which has state ‘Unposted’. Click on Post button to confirm the entry.

Now we have to close previous fiscal year as we do normally.

Further more, we can check in Chart of Account for all entries which we have created to varify.

How to install OpenERP on CentOS ?

As we all know that we can install OpenERP on most of the operating system. Today we have done installation on CentOS. Steps are very easy to perform this operation.

Persons who have experience on Ubuntu, they can do this job very easily. We have a command in Ubuntu ‘apt-get install‘ to install required packages. Whereas in CentOS, you can do this with the help of ‘yum install‘ command.

Create new system user with this command
adduser openerp

Now install and configure the PostgreSQL.

yum install postgresql postgresql-server

Sometimes it may happen that by default system is installing older version of postgresql (version from 8 series). Here, I am going to setup version 9.X on my machine. I have installed CentOS 6.3 x64. I have to take postgresql from repository using wget command.


Now, install repository

rpm -i pgdg-centos91-9.1-4.noarch.rpm

For excluding posgresql, we have to change into repository file of CentOS and add ‘exclude=postgresql*’ under the [base] and [updates] sections:

cd /etc/yum.repos.d
vi CentOS-Base.repo

Let’s check that postgresql packages are available.

yum list postgres*

After above configuration, we can install PostgreSQL 9.

yum install postgresql91 postgresql91-server

And execute following commands:

service postgresql-9.1 initdb
service postgresql-9.1 start

To set postgres user, password switch to postgres user.

su - postgres

psql postgres postgres

postgres=# alter user postgres with password ‘postgres’;

By default postgresql access is limited to local computer. For making it active, change into following files. You can also change default port.


After making changes, you have to restart postgresql service by following command.

service postgresql-9.1 restart

postgres=# show listen_addresses;




(1 row)

postgres=# show port;




(1 row)

Now we have to setup and install required packages for OpenERP.

yum install python-dateutil python-feedparser python-gdata python-ldap
python-libxslt1 python-lxml python-mako python-openid python-psycopg2
python-pybabel python-pychart python-pydot python-pyparsing python-reportlab
python-simplejson python-tz python-vatnumber python-vobject python-webdav
python-werkzeug python-xlwt python-yaml python-zsi

For missing packages, you can execute it following way.

easy_install python-openid

And its done.