Maintain log of Product sale price in OpenERP…


Assume that we are running our business in OpenERP and managing all our processes in good way. We are selling products to our customers and update product price according to market. When we have started our business, we were sell product X in 10 USD but now we are selling the same product in 50 USD. It shows that our business is going good way and also getting new customers.

But we have one big question in our mind is that how this price has been changed from 10 USD to 50 USD means at what time we have changed price of our product. We have no track for this change. Just to overcome from this situation we have implemented a solution.

After installing module, you will see “Product Rate” menu at this location : “Configuration/Products”

Now select product that you want to configure. We have just added some prices as per date.
Latest price is selected according to last date.

Now just open product form. You will see “Update” button besides Sale Price field. User can also enter price manually. Sale Price will update from configuration table after click on “Update” button.

Advertisements

How to install Magento in Ubuntu ?


Now it’s turn to install another eCommerceMagento‘ which is feature-rich eCommerce platform built on open-source technology. Magento is available in two editions: Community and Enterprise.

Installing and Configuring Apache

$ sudo apt-get install apache2

You may see following message during installation:

apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName

To fix that problem, you need to edit the httpd.conf file. Open the terminal and type

$ sudo gedit /etc/apache2/httpd.conf

By default httpd.conf file will be blank. Now, simply add the following line to the file.

ServerName localhost

Save the file and exit from gEdit.

Finally restart the server.
$ sudo /etc/init.d/apache2 restart

* Restarting web server apache2
…. waiting             [ OK ]

sudo a2enmod rewrite

Installing PHP

sudo apt-get install php5 php5-curl php5-gd php5-mcrypt php5-mysql

Installing MySQL

sudo apt-get install mysql-server

To know more system requirements click on following link :

http://www.magentocommerce.com/system-requirements

Now create directory for magento

mkdir /home/magento
chgrp www-data /home/magento
mkdir -p /home/magento/{public,log}

Configuring Apache Virtual Host

Now we are going to create simple virtual host configuration file that will help Apache to display the data of directory /home/ubuntu/magento for any HTTP request to localhost.magento.com

Create “magento.com” file in this location “/etc/apache2/sites-available/” with following content.

<VirtualHost *:80>

ServerName localhost.magento.com
ServerAlias http://www.localhost.magento.com

DocumentRoot /home/ubuntu/magento/public

LogLevel warn
ErrorLog /home/ubuntu/magento/log/error.log
CustomLog /home/ubuntu/magento/log/access.log combined

</VirtualHost>

Use a2ensite command and restart Apache to load the new configuration file.

sudo a2ensite magento.com
sudo service apache2 restart

To ensure that the domain localhost.magento.com resolves locally to the computer require entries to /etc/hosts file.

# For magento

127.0.0.1 localhost.magento.com
127.0.0.1 http://www.localhost.magento.com

Now hit localhost.magento.com in your browser to check working status after completion of above entries.

Now we will execute installation steps of main topic.

Type following command on prompt. It will ask for root user password.

mysql -u root -p

Now lets create database for Magento.

CREATE DATABASE magento;
INSERT INTO mysql.user (User,Host,Password) VALUES(‘magento’,’localhost’,PASSWORD(‘magento’));
GRANT ALL PRIVILEGES ON magento.* TO magento@localhost;

Now download latest stable Magento from
http://www.magentocommerce.com/download
and put zip file into /home/ubuntu/magento/public

If error: ERROR 1133 (42000): Can’t find any matching row in the user table
FLUSH PRIVILEGES;

For testing Magento, you can download it from
http://www.magentocommerce.com/downloads/assets/1.6.1.0/magento-sample-data-1.6.1.0.tar.gz

mv magento-sample-data-1.6.1.0/media/* media/
mv magento-sample-data-1.6.1.0/magento_sample_data_for_1.6.1.0.sql sample_data.sql

Now we have to insert sample data into database that we earlier created for Magento.

mysql -u magento -p
USE magento;
SOURCE sample_data.sql;

Now everything is setup so open your browser and type localhost.magento.com and follow installation steps. You will find following screen.

Here is your Magento is working.

How to install Joomla in ubuntu ?


Today we will discuss about how to install Joomla.

Lets start with LAMP Installation.

Please follow the command mentioned below. Note that caret (^) symbol is required.

sudo apt-get install lamp-server^

You will be asked to enter a new root password for the MySQL database. Press ENTER after password.

You will be prompted to enter the password again for confirmation.
Please wait upto completion of installation.

Let’s move on further step.

Check Apache

Launch your web browser (Firefox, Google Chrome, etc.) and open one of these addresses:

http://localhost/ or http://127.0.0.1/

Apache is working perfectly if you get this page:

Otherwise restart apache with following command:

sudo /etc/init.d/apache2 restart

Check PHP

You need to create PHP file in /var/www  and add following code into it:

<?php phpinfo();?>

and save this file as a test.php

Then open this address:

http://localhost/test.php

You should see a page like this:

Configure MySQL

Since you are using the LAMP web server locally, your MySQL database must uses the same IP address of your localhost which is: 127.0.0.1. Via the Terminal, run this command to verify it:

cat /etc/hosts | grep localhost

Here is the correct output you must get:

cat /etc/hosts | grep localhost
127.0.0.1 localhost
::1     ip6-localhost ip6-loopback

Also verify that the bind address is set correctly by running this command:

cat /etc/mysql/my.cnf | grep bind-address

You should get this output:

cat /etc/mysql/my.cnf | grep bind-address
bind-address = 127.0.0.1

If you get a different IP address, then edit the my.cnf file with this command:

sudo gedit /etc/mysql/my.cnf

Search for the line which has contain “bind-address” and correct its address by replacing it with 127.0.0.1

phpMyAdmin Installation

GUI for managing your MySQL databases:

sudo apt-get install libapache2-mod-auth-mysql phpmyadmin

You have to select a web server that will be configured automatically to run phpMyAdmin.
Select apache2 and press Enter:

You will be asked to configure a database for phpmyadmin with dbconfig-common, select Yes and press Enter:

Enter the MySQL password and press Enter:

phpMyAdmin installation is completed.

Now its turn to download joomla.

Download latest joomla version from following link :

http://www.joomla.org/download.html

Copy joomla directory in this directory : /var/www/joomla

Create a MySQL database and MySQL user

Disable Output_Buffering

The installation of Joomla requires to turn off output_buffering.

– Edit the “php.ini” file:

sudo gedit /etc/php5/apache2/php.ini

– Make following changes

output_buffering = 4096
To
output_buffering = off

– Save and close.

Now start the installation of joomla by opening following link:

http://localhost/joomla

Follow setup instructions :

In this page, provide database name, username and password as created above:

After finish installation process, click on ‘Remove Installation Folder’.

Now you will enter administrator information for access it.

Administrator console

How to configure Pricelist in OpenERP ?


Pricelist is just an option by which we can set the price for particular product with some additional calculation like taxes.

How to configure Request for Quotation in OpenERP ?


Today I am going to post a new OpenERP functional video.

My topic is Request for Quotation.

For each business deal, we need to have sales, purchase, quotation and all these things in matter.
OpenERP provides all these facilities to manage our business easily.