Friday, October 23, 2015

Odoo 8 - PayUMoney Integration

Pragmatic Techsoft has developed “Odoo 8 – payumoney” integration which is fast moving into the online transaction payment gateways. The deployment is easy and meeting all requirements for card payments, online payments. It works with Sale Order as well as Website module of Odoo 8 where online payment acquirers can be configured as PayUMoney gateway

Following are the flow with which this integration will be reviewed
  1. Configuration of PayUMoney settings
  2. Sale Order processing
  3. Accepting the payment in PayUMoney
  4. Updating the payment received in Odoo
  5. Website/Online order check out process

1.Configure PayUMoney

Install the payment_payumoney module.
Goto Settings-->Configuration-->Accounting
Click on Manage Payments Using PayUMoney.





Click on “Configure payment acquiring methods”
Configure your PayUMoney Account.
Put your Merchant Key and Salt provided by PayUMoney.
Set the Associated Journal to create payment using PayUMoney.

2.Processing Sales Order

Go to Sales-->Sales-->Sale Order
- Create New Sale Order and Confirm it.
- You will see PayUMoney button in Online Payment Options.
- To Pay with PayUMoney Click on PayUMoney Button then it will redirect you to PayUMoney Website.

3.Accepting Payment in PayUMoney


- Login to your PayUMoney Account.
- Select Payment Method to Pay and pay.

After successful payment you will be redirected back to Odoo.

4.Payments update in Odoo


After successful payment one payment record is created in Odoo against the customer.
In the reference you can see the PayUMoney transaction ID.

One transaction record is created in Payment Transactions where you can see all transaction related information.
Go to Settings-->Payments --> Payment Transactions

5.Website / Online Checkout


- Go to Website View
- Add Items to Cart and process checkout

- Fill up Billing Information and confirm the order
- On Validate Order form you can see PayUMoney Button in payment methods
- Select PayUMoney as payment method and click on pay now
- It will redirect you to PayUMoney website.
- Process the transaction
- After processing the transaction it will redirect you to Odoo.

Tuesday, October 13, 2015

Installation steps of Odoo 9



Click Here to Download Odoo 9



Step 1 :

First step to start is, make sure your server has all the latest versions & patches by doing an update:

You can use the below given two commands.


sudo apt-get update

sudo apt-get dist-upgrade


Step 2 :

We need to create an Odoo System User which will own and run the odoo application on our system.

This user is a system user, i have created this user here as home directory is reside in /opt/odoo with the help of below command.

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


Step 3 :

We can check wether we are able to login with newly created user with the below command.

sudo su - odoo -s /bin/bash


and check wethere we landed in the home directory /home/odoo by the command pwd.

By pressing exit, logout or ctrl+d come out from the user odoo.


Step 4 :

In this step we will install the database postgresql. With the help of below command.

sudo apt-get install postgresql

By default it will install postgres 9.3 on Ubuntu 14.04 LTS, if we want we can upgrade it with the required version.
We need to update the source list.

To install postgresql 9.4 follow the below steps.

Step 4.1

Create the new file pgdg.list under /etc/apt/sources.list.d directory and add the below line for repository.


Step 4.2

Import the repo key with below command.

wget --quiet -O - 

https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -


Step 4.3

Updte the package list.

sudo apt-get update


Step 4.4

Once the package list is updated, we can search and install the required 9.4 version of postgres.

sudo apt-get install postgresql-9.4


Step 5 :

Once we have install postgres 9.4 version, login to postgres to we can configure the required database.

sudo su - postgres


Step 6 :

Here we create a new database user which has privilige to create and drop the database. We create the user name odoo here and password is of individual choice.

createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo

Enter password for new role: ********
Enter it again: ********


Step 7 :

once all steps performed, exit from the account, with below command.

exit


Step 8 :

Installation of required libraries.
We can install the libraries with below command.

sudo apt-get install python-pip python-dev libevent-dev gcc libxml2-dev libxslt-dev node-less libldap2-dev libssl-dev libpq-dev python-dev python-ldap libsasl2-dev


Odoo9 is depends on node-less package.


Once installing the system libraries we can install python libraries using pip. Create requirement.txt file on the system.
Here is command which will change the directory to /tmp, get the official requirement.txt from
and install it in your system. it will reduce steps to install the python dependency to install odoo 9 in your system.
First move to /tmp directory.

sudo cd /tmp

wget https://raw.githubusercontent.com/odoo/odoo/9.0/requirements.txt && sudo pip install -r requirements.txt


Once it finished, all the dependancies for Odoo9 installation will be finished.
  
Step 9 :
For Qweb templating, we have to install wkhtmltopdf and we can download it from below links.
For 32 bit :

For 64 bit :

Download the required one as per version in /tmp directory.
And run the below command as per requirement.
For 32 bit :

sudo dpkg -i /tmp/wkhtmltox-0.12.2.1_linux-trusty-i386.deb

For 64 bit :

sudo dpkg -i /tmp/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb


Step 10 :
Now we will proceed to Odoo installation.


Download the latest Odoo9 with below command in the /opt/odoo directory.

sudo wget https://github.com/odoo/odoo/archive/9.0.zip

Unzip the downloaded file 

sudo unzip file_name

Rename the extracted folder to odoo

sudo mv Extracted_folder  odoo


Step 11 :
Configuration of Odoo.
Here we have to find the configuration file of odoo application and it is reside under
/opt/odoo/odoo/debian directory.
We have to copy this file and also need to change permission and ownership.
Below are the commands we can use for this.

sudo cp /opt/odoo/odoo/debian/openerp-server.conf /etc/odoo-server.conf

sudo chown odoo: /etc/odoo-server.conf

sudo chmod 640 /etc/odoo-server.conf





we can verify made changes with the below command

ll /etc/odoo-server.conf

with the above changes, /etc/odoo-server.conf file will be owned and writeable only by odoo user and group. Root has read permission on it.
Make below changes to allow odoo to use default addons.


In the configurtion file add the below line for addons_path.

addons_path = /opt/odoo/odoo/addons

Now we move towards to init script.
By default it is stored in  /opt/odoo/odoo/debian/init. Modyfy it set the proper daemon path and save it.
Copy it /etc/init.d dirctory and name it as odoo-server and also change ownership to odoo user and permit it to execuatable.
We also need to create the log file to store the logs with the permission that odoo user should write it.


Below are the commands.

sudo mkdir /var/log/odoo

cd /var/log/odoo

sudo nano odoo-server.log

Save the file and exit from it.


give the permission to writable by the odoo user.

sudo chmod 755 /var/log/odoo/odoo-server.log

sudo chown odoo:root -R /var/log/odoo/

So we have finished with the configuration part.

Step 12 :
Its the time to check our server

to start the server type the below command.

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

we can see the log file

sudo tail -f /var/log/odoo/odoo-server.log 


if everything is fine in log file, then we can go in brower with the ip or localhost if it configured locally.

http://IP_ADDRESS:8069

or

http://localhost:8069 

if configured locally.

To automatically start and stop the Odoo at the time of system sart and shut, run the below command.

sudo update-rc.d odoo-server defaults







Friday, September 25, 2015

Odoo OpenERP CRM Google Apps / Gmail Integration Contextual Gadget

Introduction

Pragmatic has created the much required automation and seamless integration of Odoo with Gmail Plugin/ extension. We had used the Gmail Contextual Gadget to integrate with Odoo and create Leads/ Contacts/ Customers/ Support Tickets and much more at just a click of a button.

Pragmatic Odoo Gmail Gadget - Preview

Gmail Contextual Gadget (Gmail plug-in/extension): Contextual gadgets are applications that are displayed at the bottom of individual email messages and are triggered by contextual clues, such as the contents of Subject lines, sender and recipient email addresses, and more.

Gadgets

Gadgets are custom HTML and JavaScript components that run within an iframe and can be embedded within various web pages. Gmail includes support for embedding gadgets within the web interface, creating content-rich data displays and extending Gmail with additional functionality.

Contextual Gadgets

Contextual gadgets are applications that are displayed at the bottom of individual email messages and are triggered by contextual clues, such as the contents of Subject lines, sender and recipient email addresses, and more. For example, Gmail already provides a YouTube contextual gadget. If the body of an email contains a link to a YouTube video, a clickable thumbnail view of the video appears at the bottom of the email.

Contextual gadgets support the gadgets.* API as well as an additional API that allows them to extract contextual clues. Contextual gadgets in Gmail provide a way to integrate functionality into the workflow at precisely the point where it is useful.

A Gmail contextual gadget is a gadget that is triggered by clues in Gmail, such as the contents of Subject lines and email messages.

Development and deployment of Contextual Gadgets

There are two development and deployment models:
  • Develop a Gmail contextual gadget for use within a single organization's Google Apps domains (an in-house application).
  • List the gadget for sale on the Google Apps Marketplace.
A Gmail contextual gadget can be triggered by content in any of the following parts of an email:
  • From
  • To
  • CC
  • Subject
  • Body
  • Sent/received timestamps

Gadget Structure

The implementation of a Gmail contextual gadget consists of two parts:
  • 1.Extractors – Can be one or more extractors
  • 2.The Gadget Spec

Extractor

Detects contextual clues in email, determines which types of content will trigger the gadget, and passes the triggering content to the gadget. An extractor does this by comparing a given regular expression to content in one or more given parts of each individual email message (From:, To:, etc.). In the YouTube gadget, the extractor checks the subject line and body of the email for strings that match the pattern of a YouTube URL.

Gadget spec

Takes action based on the content passed in from an extractor. The gadget spec includes client-side logic and UI. In the YouTube gadget, the gadget spec accepts the YouTube URL and draws a thumbnail view of the video at the bottom of the email, which you can click to play the video--right inside Gmail.

Create Contextual Gadget for Odoo

Summary of steps

  • 1.Use JQuery, or write JavaScript that conforms to ECMAScript 5 Strict Mode.
  • 2.Choose one or more pre-canned extractors. This determines which type of content will trigger your gadget.
  • 3.Write a manifest for the gadget.
  • 4.Write the gadget spec. This determines what the gadget will do when it is triggered.
  • 5.Publish the gadget spec to a location which is accessible on the public Internet. An intranet will not work. Your hard drive will not work. (Why? Google's servers need to download the gadget. If they can't reach it, then Gmail can't display it.)
  • 6.Install the gadget.
  • 7.Test the gadget by sending yourself some email. The gadget should appear in Gmail whenever you read an email that contains the right sort of content

Google Apps Marketplace contains enterprise applications that can be added to a Google Apps domain. If you are an application developer, you can publish enterprise apps to the marketplace for others to use. If you're an enterprise admin for Google Apps, you can discover and install new apps from the marketplace.
To publish “Google marketplace app” we have to create Google app account and also have to register domain.
Goto console.developers.google.com and login with gmail business domain administrator account.
Create client id for web application from credential tab, set authorized javascript url

Select configuration from Google apps marketplace sdk and give required information, like, App icon, app name, description etc.
Select gmail contextual gadget extensions, Click ok and then click on Test Installation

It will ask for conform installation accept it and your app is now installed to your gmail domain
Now login with your business account domain administrator and select the gadget from Marketplace Apps.

Gmail Odoo integration screens

Click on Go button. It will check this will search for lead and if email id is found in lead will show lead info.

Lead information form
If that email id is not present in odoo lead then it will open create lead form.
Create lead page

Fill these information and click on submit will create lead in odoo.

Friday, September 4, 2015

Pentaho-biserver 5.3 features

Pentaho

Pentaho is a suite of open source Business Intelligence (BI) products which provide data integration, OLAP services, reporting, dashboarding, data mining and ETL capabilities. The Pentaho suite consists of two offerings, an enterprise and community edition. Pentaho's core offering is frequently enhanced by add-on products, usually in the form of plug-ins, from the company itself and also the broader community of users and enthusiasts.
You can learn more about Pentaho at http://www.pentaho.com/

Pragmatic Pentaho Business Analytics Platform (BA Platform 5.3)

Pragmatic Pentaho BI is a pre-configured, secured, optimized and ready to run image for running Pentaho BI on Amazon EC2 in a production mode. Pentaho BI is a very popular Business Intelligence Platform of the Pentaho Suite of applications. Commonly referred to as the BI Platform, and recently renamed Business Analytics Platform (BA Platform), makes up the core software piece that hosts content created both in the server itself through plug-ins or files published to the server from the desktop applications. It includes features for managing security, running reports, displaying dashboards, report bursting, scripted business rules, OLAP analysis and scheduling out of the box.
Commercial plug-ins from Pentaho expand out-of-the-box features. A few open-source plug-in projects also expand capabilities of the server. The Pentaho BA Platform runs in the Apache Java Application Server. It can be embedded into other Java Application Servers.

Pentaho Business Analytics 5.3 - The Feature List

Pentaho 5.3 delivers many exciting and powerful features that help you quickly and securely access, blend, transform, and explore data. Highlights include new Analyzer APIs and documentation, Redshift and Impala improvements, Hadoop clusters and Hadoop distribution support, better support for high load Carte environments, and some minor functionality improvements around Pentaho Interactive Reports and Hadoop steps and entries.
Pentaho BA 5.3 improvements will help you work with Analyzer APIs, explore the Streamlined Data Refinery, and set up multi-tenancy with Pentaho Business Analytics.
Pentaho BA 5.3 improvements will help you work with Analyzer APIs, explore the Streamlined Data Refinery, and set up multi-tenancy with Pentaho Business Analytics.

BA Server / Plugin Improvements - Overview

  • Data Access - 0 bad builds during ALL 5.3.0 RC builds (CE)
  • Analyzer JS API and Documentation (EE)
  • PIR Improvements (EE)

  • ○ Design & Runtime row-limits and ability to schedule when hit
    ○ Toolbar button when embedded
    ○ Performance Improvements

New Analyzer APIs & Documentation Updates

With 5.3 comes a new set of APIs to provide more control over Analyzer when working in an embedded fashion. These APIs allow for more fine-grained interaction with the Analyzer reports and data. The Analyzer extensibility APIs will live in a single place, and include introductory material, as well as samples.

Multi-Tenancy in Pentaho 5.3

Pentaho has three categories of multi-tenancy that is achieved with 5.3
  1. Data multi-tenancy allows developers and integrators to apply custom security and business rules to control access to data.
  2. Content multi-tenancy separates content, such as reports and folders, among tenants.
  3. UI multi-tenancy presents different styles of the user interface for each tenant.

There are two required components to make multi-tenancy work. Users need to be associated with tenants via roles, tenant IDs, or other identifiers which indicate what content and data users see. Similarly, there must be something in the data that can be used to restrict access. The combination of user information and data make the multi-tenancy approaches described here possible. Since these approaches are data model and data-driven, they are very flexible.
The most common category of multi-tenancy is data multi-tenancy. Data multi-tenancy allows developers to apply their own custom data access rules at runtime. For example, each tenant might only be allowed to see data which is associated with their tenant ID. Here are the most common methods for data multi-tenancy in Pentaho Business Analytics.
  1. Sharding: Each tenant has its own database or schema. This approach has the advantage of controlling per database and ensuring data is separated. Note that with this approach, multiple databases and servers will need to be managed.
  2. Striping: Tenants share a database, but the tables have a tenant ID column to indicate which tenant can see the specified data. This approach has the advantage of managing only a single database. Note that with this approach, databases can become very large.
  3. Data Models: Tenancy is controlled at the data level where different tenants (or sub-tenants) are only able to see certain data. This approach is very flexible, but the data to restrict on must usually be known in advance.
  4. Hybrid: Combinations of sharding, striping, and data model. Each of the approaches above can be combined into a single, flexible solution to data multi-tenancy.

Updated Streamlined Data Refinery

Pentaho 5.3 has updated the Streamlined Data Refinery to improve the modeling process, added security and data source improvements, and added support for Amazon Redshift and Cloudera Impala.
Features of interest
  • Working with the Streamlined Data Refinery
  • Build Model step
  • Annotate Stream step
  • Publish Model step

Other updates with Pentaho 5.3

Here we cover changes to the software that might impact your upgrade or migration experience. If you are migrating from an earlier version than 5.2, these pointers would be of great help!
Manually Migrating Big Data Cluster Configurations Stored in Hadoop Steps and Entries
If you are migrating or upgrading to PDI 5.3 or greater, and you have transformations or jobs that use the following Big Data steps or entries, you might need to convert the existing cluster configuration information to use the Hadoop Clusters feature.
  • HBase Input
  • HBase Output
  • Pentaho Map Reduce
  • Oozie Job Exec
  • Hadoop Job Exec
  • Pig Script Exec
You only need to perform the conversion process if you edit one of the above steps or entries in Spoon. Otherwise, you do not need to complete the conversion process. Note that you can continue to run scheduled transformations and jobs without the conversion, as long as you do not manually edit one of the above steps or entries.

Interactive Reports Performance Improvements
Pentaho 5.3 has implemented a number of performance improvements for Pentaho Interactive Reports (PIR), including the ability for system administrators to set system-wide maximum row limit, a way to extend PIR to show toolbar buttons, and incorporated the query-metadata collection capabilities of Pentaho Report Designer (PRD) into PIR.

System-wide Row Limit
Pentaho 5.3 comes incorporated with the capability to set a system-wide row limit for Pentaho Interactive Reports (PIR). Users will not be able to override this row-limit once you have set it, although they will have the option of setting their own, smaller, row-limit through the query settings. This will improve performance when the returned data set is fairly large, and also adds the ability to run the full report in the background.

Show Repository Buttons Feature
Extended PIR so that you can show the buttons that interact with the repository in the PIR toolbar. This will allow you to embed PIR without having to use a third-party tool to hook the callbacks on. This function is triggered by passing a parameter on the URL of the PIR plugin.

Query-Metadata Collection
The changed PIR to take advantage of the query metadata collection improvements for Report Designer in Pentaho 5.2. This query metadata feature will improve the design time of Interactive reports.

Monday, August 3, 2015

Pragmatic Odoo 8 SaaSKit V1.2

SaaSkit by Pragmatic

SaasKit is a state of art solution for cloud-based Software as a Service for Odoo 8 (formerly OpenERP) that can be easily adopted by SMEs. Companies can add different features or modules to the existing Odoo installation or system just by configurations and provide it in SaaS model to their Clients or end-users. ‘As-is’ installation of the SaaSKit would help any company to leverage on its pragmatic power in achieving SaaS advantage and strategically places them in the new found SaaS market.

SaaSKit enables companies to resell Odoo to multiple tenants in subscription model and thereby leverage on Odoo SaaS implementation at just click of a few buttons.

We use cutting edge technologies (Advanced Version- Need Based)
  1. Loose Coupling with segregation of lookup and transactional database
  2. Load balancing with nGinx, AWS EC2 Load Balancer - ELB
  3. Multiple installation based high availability – both on AWS Multi availability Zone as well
  4. Multiport Tenancy; user data discreteness (up to 4 Levels - Master, Tenant, Portal, Web store)
  5. Failover management with Database replication
  6. Database Connection Pooling for handling simultaneous users.

Salient features of Odoo SaaSKit V1.2

  1. SaaS Selling page – Odoo Web Commerce, Demo and Payment option.
  2. Multiple SaaS Product Configuration – Odoo Product Master – Bundled and BOM based
  3. Connection pooling for Master Database
  4. Load balancing by Multiport implementation of SaaSKit
  5. Custom Domain Support for each of Tenant Database
  6. Localization: Option of selecting Tenant user language at check out itself
  7. POS customization to be standalone with Sales front end.
  8. Automated SaaS Billing for Tenants based on requirement
    1. Per user per module per month (Ex: (module x month) x (number of users)
    2. Fixed price - Per module per month, User per month (module x month) + (user cost * number of users).
  9. Portal access for Tenant Account self management
  10. Payment gateway integration.
  11. MIS and Dashboards – SaaS Panel
  12. Device independence – BYOD
  13. State of art – SaaS Administration with SaaS Panel
  14. SaaSPanel Running Dashboards and reports
  15. SaaS Panel Administration with Activate/ Deactivate/ Terminate options for Tenant Database
  16. SaaS Tenant Technical Support option with Pseudo Admin.

Work flow

SaaSKit Terminologies

  1. SaaS Master/ Provider – Technology Company (SaaS Vendor) who sells Odoo in SaaS model
  2. SaaSKit Admin – The Admin account for SaaS Master
  3. SaaSKit Tenant – The end user of the Odoo installation (Each tenant has a unique Database)
  4. Tenant Admin – The admin user account for SaaS Tenant management

Installation of SaaSKit and Setup of Odoo Server

Preferred – always new instance (new Odoo with bare DB), installation to be done by Pragmatic.
  • If there is an Odoo installation that is already present with operational data and SaaSKit need to be added to make this instance as the SaaSMaster – we need to match Odoo Version with that of SaaSKit, that SaaS Module can be installed without errors. Not Preferred approach. 

SaaSKit - Databases

Default Dbs that gets installed with SaaSKit
  1. SaasMaster – Control Db to be created from DB creator (Odoo).
  2. Bare Tenant – Template DB – this is a need based database to easily replicate and create a new tenant. This can be more customized based on advanced editions

SaaSMaster Configuration.

Configure – General Settings.
Publish the SaaSKit Domain – useful for creating Sub-domain




SaaSPanel Configuration – Manage Tenant DB



SaaS Configuration



Email setting options

  1. Trial Period: Alert before No:of Days – Numeric Value (n) : : This would send email alert before ‘n’ days to the customer for starting the paid subscription.
  2. Paid Period: Alert before No:of Days (x) – Data base Expiration: This would trigger an email before ‘x’ days in paid period to remind the tenant of bill payment
  3. Grace Period: ‘y’, In Paid period, the tenant gets a ‘y’ number of grace period in days, of system usage even when the invoice is not paid. After Grace period the data base is rendered inactive
  4. Data Purging Days: ‘z’, would be the number of days after the grace period for which the database would be retained by the SaaS Provider after which it would be purged.
  5. Free Trial Period: The number of days for which the Free trial should work.


Figure 3: Settings with timeline

SaaS Product (Type)



SaaS Product allows the SaaSAdmin to create products in such a way, where there could be Base module and Addons on top of existing Base modules.

Once SaaS Product type selection enables the option to publish saas products as
  1. Base
  2. Addons
Free Trial Period: Configure the free trial period usage


Auto Process

SaaSKit can be operated in two models – with SaaSAdmin approval and manual mode of processing requests for Topups, bill payments addition and removal of users.

Auto Process is the option added to automatically process the top up without SaaS Admin or manual intervention for 3 of the following options for all existing tenants
  1. Topup
  2. Bill payments
  3. Addition and Removal of users
Here whence the check boxes are true – the processing would be automatic and the tenant can see the results on the instances instantaneously.

Billing Type