Thứ Sáu, 24 tháng 7, 2015

Cai dat magento connector odoo 8



tạo thư mục để lưu addon connector

mình tạo

/root/addon-magento


chạy lệnh trong centos
git clone https://github.com/OCA/connector.git --branch 8.0 
git clone https://github.com/OCA/connector-ecommerce.git --branch 8.0
git clone https://github.com/OCA/connector-magento.git --branch 8.0
git clone https://github.com/OCA/e-commerce.git --branch 8.0
git clone https://github.com/OCA/product-attribute.git --branch 8.0
git clone https://github.com/OCA/sale-workflow.git --branch 8.0
sau đó thêm đường dẫn thư mục addon vào file odoo-server.conf
tôi dùng centos 6 nên file nằm trong /etc/odoo-server.conf


addons_path=/root/addon-magento/connector
addons_path=/root/addon-magento/connector-ecommerce
addons_path=/root/addon-magento/connector-magento
addons_path=/root/addon-magento/e-commerce
addons_path=/root/addon-magento/product-attribute
addons_path=/root/addon-magento/sale-workflow 

Cài một số module còn thiếu Ví dụ module sau
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum install python-simplejson
yum install python-lxml
pip install magento

sau khi cài, sẽ có 1 thư mục nằm trong thư mục module của python, bạn vào thư mục module của python và copy nó sang thư mục của odoo
ví dụ thư mục modul python của tôi là
/usr/local/lib/python2.7/site-packages
tôi copy thư mục "magento" sang thư mục module của odoo
/opt/odoo

cài đặt module trong magento: vào econnect và tìm module của openlab

Openlabs_OpenERPConnector

Cấu hình magento web service

Đăng nhập vào Magento admin panel, sau đó vào System > Web-Services > SOAP/XML-RPC - Roles.
Tạo role named openerp và chọn kết nối All resources.
In System > Web-Services > SOAP/XML-RPC - Users,
Tạo tên sử dụng bất kỳ với API key (mật khẩu), ở đây ví dụ tôi chọn user là "openerp", và API key là "vudung"
In User Role, chọn openerprole.


Thứ Hai, 20 tháng 7, 2015

Cac loi thuong gap khi cai dat va su dung magento


Disable cache khi không vào được admin panel
vào phpmyadmin, chạy lệnh
UPDATE `core_cache_option` SET value=0;
Sau đó xóa thử mục cache trong /var/cache

openerp Error! You cannot define the decimal precision of 'Account' as greater than the rounding factor of the company's main currency

Hi;
Delete or Cut and Paste the folder "decimal_precision" (paste it anywhere, you can restore it later).
try to login, if it's OK, restore the folder to it's location under .../addons/..., and correct your configuration as indicated in the error message: Decrease the Decimal Precision of 'account' you have changed before or increase the rounding factor of the company currency.
You can change it by opening: Settings ----> Technical ---> Database Structure ----> Decimal Accuracy (for Account)
Account Dec Precision
And under : Settings ---> Companies ---> Companies ----> Your Company ---> Configuration (TAB) and do as follow
image description

Ok, let's do it another way.
If you are familar with pgAdminIII:
(Instead of pgAdminIII, you can use any other tools to browse and edit your database Tables)
Connect to your database, edit the table decimal_precision
decimal_precision table
Save your modifications and restart your server.
Best regards