Thursday, January 29, 2015

Put multiple images for a product in Odoo 8 ecommerce web page

I really like the idea that Odoo provide both a powerfull ERP solution as well as a quite functional ecommerce solution. However compare to other ecommerce solution Odoo is missing some functions, One concern is on Ebay, Amazon as well as many e-commerce websites, they use slides to show multiple pictures at the left-top section. But Odoo only allow one pictures. So I raised a question here: 
"Can an e-commerce pages show multiple pictures at the left top part of the page in V8?"

Luke Branch now provides a addon. (check https://github.com/OdooCommunityWidgets/website_multi_image). It works great and I want to share how I install this addon with you. 

Here is how I install the addon, please be aware you configuration/odoo folders may be different, if you follow my post to install Odoo you should be able to follow this instruction without issue.  

First stop odoo server and run the following to get the custom module. 


sudo su - odoo -s /bin/bash
mkdir custom_modules
cd /opt/odoo/custom_modules/
git clone -b 8.0 https://github.com/OdooCommunityWidgets/website_multi_image.git 
Now you have the file you need to Scaffolding this module. Still run as odoo user:
cd ..
./odoo.py scaffold website_multi_image addons
cp -R custom_modules/website_multi_image addons/.
At this point you need to start odoo server. Log into Odoo as admin, make sure "Technical Features" is turned on for admin, if not, go to Settings->Users, edit admin user by check "Technical Features" checkbox. 

No go to Settings->Modules->Update Modules List and click Update button. When finished, install "Product Multi-Image". 

Then you can go to Product configuration page -> product images and add more images for the product. 

Well here is how it looks like on website: 




And here is how it looks in product maintain page: 



Friday, January 9, 2015

Connect Oracle using ODBC 32 bit in 64 bit Windows 7

For some reason I need to build an ODBC connection to Oracle database, the Oracle database version is 11.2.0.2. This turned out to be quite a big challenge. There are several issues during the installation, as usual, Oracle never make things easy. Anyway, here is how:

1. Download Instant Client basic 32 bit and ODBC 32 bit for 11.2.0.2 from here.
2. Extract both zip files you downloaded, put the files in instantclient_11_2 folder into C:\instantclient_11_2\
3. Add C:\instantclient_11_2 into Windows Path
4. Run C:\instantclient_11_2\odbc_install.exe
    You may see a warning from Program Compatibility Assistant says: This program might not be installed correctly. Just ignore it.
5. Goto ODBC 32bit console, tt is not easy to find Windows ODBC 32 bit console, the fastest way is to run C:\Windows\SysWOW64\odbcad32.exe from Start->search
6. If you have ODBC 32bit console open, create a new ODBC connection using Oracle in instantclient_11_2. You will fill the TNS Service Name like this: //host_ip_or_url:port/instance_name.
6. At this point you can test the new ODBC connection, but mostly you will see this error:
    ORA-12705: Cannot access NLS data files or invalid environment specified
The solution was to find the registry key named NLS_LANG under:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE
and rename it to anything else. I put an "x" at the end. This key is left over from a full install of Oracle. The instant client ODBC works properly now.

Friday, January 2, 2015

Install Adobe Flash Player on Android 4.X

I just got a new Huawei Mate 7, a fantastic phone in my opinion. But I found now Android doesn't support Flash Player anymore, Photon browser can natively support Flash but the Ads is quite annoying. So I did some research and found a solution.

  1. Ensure that the Android device is connected to the Internet.
  2. Open the Settings menu.
  3. Select Security
  4. Select Unknown Sources.
  5. Tap OK to confirm your selection.
  6. Close Settings.
  7. Download flash player apk file here
  8. Open the apk file to install flash player. 
  9. Install Dolphin browser, you can find Dolphin browser from Play Store. I have tried different browsers, no luck with Chrome or Firefox. You may have better luck though. 
Thats it, I don't think you need to change any setting for Dolphin browser.