Audit Trail in OpenERP - (Odoo)

In business there are number of users. It is tedious task for administrator to track all user's activity. Here OpenERP (Odoo) brings good feature to track user activity on any model. It means user perform any action [like create, modify, delete] on any model that all performed action can see administrator by logs. This feature is introduced in Audit Trail module

Audit Trail allows you to log every user operation on all system models. (such as sales, leads or products)

Required module: - Audittrail

First you just need to install the Audit Trail module in OpenERP (Odoo). After installing it, you will see in the Reporting menu an Audit menu item


Install Audit Trail Module


To track user activity you need to create audit rule. Audit rules are specified on a particular model that you want and assign user that you want to track that activity. The rules tell the system which activities performed by the user need to be logged.

How to create an audit rule :-


Navigate to : Reporting/Audit/Audit Rules

  
For example: - I have created a rule for sale order model to track activity of sale_user

Create an audit rule

   
To activate the audit rule you need to first 'Subscribe' to the audit rule.


Subscribe audit rule


To test this, login with sale_user, make changes to any in sale order. I have just created a sale order to show logs.


Create sale order to check audit logs


Now login with administrator. To see the logs of the activities performed on the sale order model by sale_user :-


Navigate to : Reporting/Audit/Audit Logs



Audit logs

You will see a list of the changes made to the sale order model. Click on logs to see the changes sale_user made to the sale order. You can also check old values and new values for comparison.

You can track every user operation on all the objects of the system. [
operation such as: create, modify, delete]    



Cheers Enjoy OpenERP (Odoo)    :)
Thanks,

Mayur Maheshwari 

  Skype : mayur_maheshwari1

How to add custom field on any object in OpenERP - Odoo



How to add custom field on any object in OpenERP (Odoo) without doing any hardcode!!

Say for example we need a field “Weight” on Vehicle.

Step 1: Activate Developers Mode.

a) To do that click on user name at the right upper corner of your screen and select About OpenERP (Odoo) option.

Add custom field in OpenERP

Activate Developer Mode

 
b) You will get window as shown in image below. Click on the link Activate the developer mode.

Add custom field in OpenERP


Activate Developer Mode

c) We will get a debug view From where we can edit all views of selected object.

Add custom field in OpenERP

Debug View


Step 2: Identify your object

To do that just hover your mouse on any of the field. It will show you some information like field name, object, field type etc.

Add custom field in OpenERP

Field information

As we know now that our object name is 'fleet.vehicle' and we have to add a new field to this object say for example 'weight', type of this field is integer. Let's edit our object. Here one thing is to notice that these changes are for the existing database only, it will not reflect in other database.

a) Go to the menu Settings → Techniacl → Database Structure → Models and search for fleet.vehicle

Add custom field in OpenERP

Object Search

b) Open that object and click on edit, drag the mouse to reach bottom of the page and click on Add an item link.

Add custom field in OpenERP

Object View


c) Add all detail like field name, label, type then click on 'Save & Close' button and finally click on Save button which is in Red color.

Add custom field in OpenERP

Add new field

As a field x_weight is added to our object fleet.vehicle we will now edit different views of vehicle to see the changes.

Step 3: Edit View(Form, tree)

a) Before editing excising views lets observe our current view.
Open Vehicle form view and see there is not any field with label “Weight” on it.

Add custom field in OpenERP

Vehicle's form view without any Change


b) Select the option Edit Form View from Debug View window.

Add custom field in OpenERP


Edit Form View

c) You will get a window as below. Insert the new field to appropriate position, and click on save button.

Add custom field in OpenERP

Insert new field

d) Close the window and reload the page. Here we can notice that a new field is on vehicle form view. Same way we can edit search, tree view.

Add custom field in OpenERP


Vehicle's form view with a new weight field 



By: Purnendu Singh
Thanks,

Mayur Maheshwari


Configure Thunderbird plugin in OpenERP - Odoo


This article describes how to configure Thunderbird plugin in OpenERP (Odoo). OpenERP (Odoo )Thunderbird plug-in provides integration which allows you communicate and co-ordained with CRM data and shared across the company.user can work with OpenERP (Odoo) from their email client with this integration

This will not only simplify the work and save time but also provides the user a lot of options without the dire need to switch between applications.

This plug-in add many features to OpenERP (Odoo) such as

    1)   Create a contact or partner from an e-mail,
    2)  Create record/document in OpenERP (Odoo),
    3)  Send any attachment to an OpenERP (Odoo) document (such as proposals,proof of payment, order receipts, employee CV or annual appraisal).

It works for the EXCHANGE SERVER MAILS too!!

Require module : Thunderbird Plug-In
   
step 1: How to Install Thunderbird plugin-in openerp (Odoo).

 
Navigate settings/apps and search Thunderbird Plug-In and install it.


Install Thunderbird plugin


step 2: How to download Thunderbird plugin file from openerp (Odoo)

Navigate  sales/configuration/Thunderbird plug-in 
menu. 
It will open a wizard. Now download plugin /addons/plugin_thunderbird/static/openerp_plugin.xpi. you can save this plugin file to your desktop or any other location on your computer.


Download Thunderbird plugin xpi


Step 3: How to Install OpenERP (Odoo) extension (plugin) in Thunderbird.

    First of all, To do this process use the file "openerp_plugin.xpi" that you saved on your desktop.


Then follow this simple step :
1.  From Thunderbird, open the menu => Tools => Add-ons.
2.  Click Extensions,  beside the search addons there is a button Tool For All add-on click on it
3.  Go to your desktop and select that file openerp_plugin.xpi. Install it
4.  Once the openerp_plugin.xpi is installed then restart Thunderbird.

Now check menu of Thunderbird you find new OpenERP menu item is added in your Thunderbird menu bar.

A)  How to Connect openerp (Odoo) Server with use of Thunderbird plugin.

Navigate to OpenERP/Configuration menu item and click it.
A configuration window appears enabling you to enter configuration data about your OpenERP (Odoo) server.


   server   : 127.0.0.1:8069 (type your server settings and xml-rpc port)
   database : Select the database you want to connect
   user name : provide user name
   password : provide password (****)



Connect OpenERP server
 


Click the Connect button to test the connection.If given parameters are right the it will connect to the OpenERP (Odoo) Database.After that Thunderbird will ready to fit your needs. ;)

B)  How to  Create a New Partner/Link with Partner in Thunderbird

If you cannot find a partner for your e-mail in OpenERP (Odoo), the Thunderbird plugin allows you to create new partner or link with existing partner simply by using the information contained in the e-mail.

First of all, You have to select the mail from which you want to create a new contact

Navigate OpenERP/contact menu
A contact window appears which allows you to enter name, email for create new partner and link with existing partner.


Create Partner via Thunderbird in OpenERP

    click create partner button so it will create new partner in OpenERP (Odoo) or you can create a partner with the existing partner linked to it.when you click create Partner, It will redirect the Partner form in OpenERP (Odoo) according to the name and e-mail partner will create.If partner is already cretaed then it will directly open that partner form.
  
C) How to  Create a Document in Thunderbird

Navigate OpenERP/Document 
A document window appears which allows you to create the document in OpenERP directly from your e-mail.


Create Document via Thunderbird in OpenERP

Suppose you would like to create a new lead from an e-mail.open document window click create document 


Create lead via Thunderbird in OpenERP

so it will ask type of document then select lead/Opportunity in selection and click on push button. A new lead will be created in OpenERP (Odoo) from the selected e-mail.you will redirect to that page once you create a lead.

3) How to Send any attachment/email to an OpenERP (Odoo) document

As same way you can also push email to particular OpenERP (Odoo) document 


Attach Document via Thunderbird in OpenERP

suppose you would like to push your email to phone call. open document window and click push email so it will ask for type of document where you want to push. select phone call , search phone call record , Now select your record where you want to push and click on push. it will pushed to that record.

Note : If the document is already created ! 
       It shows the "SUBJECT OF THAT SELECTED MAIL " message on the dialog.
       That meas that mail in already pushed in openerp (Odoo) database.

       IN THIS CASE IT SHOWS ONE MORE BUTTON "Open Document



Configure Thunderbird plugin in  OpenERP (Odoo) : --




Cheers Enjoy OpenERP (Odoo)   :)

Thanks,

Mayur Maheshwari 

Skype : mayur_maheshwari1



Backup and Restore OpenERP Database


This article describe you how to backup and restore OpenERP database.There is two way to make backup and restore database.It means You can do by web-Interface or by commend prompt

web-Interface (GUI) :-

Simple steps for backup and restore OpenERP database:

1] Open Login screen click on manage database 





 















2] click backup menu and select your database and set password and click backup button and just save that database dump file on your system






 


3] For Restore database, Browse your database dump file set password and make name to database and click restore 




 














commend prompt :-

create database

 createdb database_name
 

Backup database :-

pg_dump --cluster 9.1/main --format=c old_database_name > new_database_name




 





Restore database :-

1 : Check file type by following command

          file <name of restore db which you want> [EX: file database_name ]



         
 








2 : If file type is simple PostgreSQL dump at that time you can you following command(dump db)

            DB=new_database_name && createdb --cluster 9.1/main $DB && pg_restore --cluster 9.1/main --no-acl -O -d $DB <  backup_database_name.dump
           
3 : If file type is ASCII C program text, with very long lines at that time you can use following command (sql db)

            DB=new_database_name && createdb $DB && psql -d $DB < backup_database.dump

[Note: When you can you step2 instead of steps3 you can get error : pg_restore: [archiver] input file does not appear to be a valid archive]





 



how to Restore zip file Database :-

First Create database using cretedb database_name then type following commend in terminal

    gunzip -c filename | psql database_name



How to  restore PostgreSQL database from .tar file

First Create database using cretedb database_name then type following commend in terminal

pg_restore -c -i -U systemusername -d dbname -v "/home/mayur/workspace/db_backup.tar" -W



Thanks,

Mayur Maheshwari



socket.error: [Errno 98] Address already in use in OpenERP

  
         This error mainly raised when another process listening on port 

Solution:

 
Change the port number for OpenERP or kill that running process and restart it again, this two hints will resolve the problem.

There are several process running on your system so first Find the process which uses the port number of OpenERP and list out that process id .For do this open your terminal and type following commend


     ps aux | grep openerp 
    
just verify the process id of that OpenERP process.

address_already_in_use_in_openerp



 

Kill the process which uses the port number of OpenERP by the following command in terminal.

       sudo kill -9 procees id [ex: sudo kill -9 3550 where 3550 is process id]

Then Restart the openerp-server .now error solved .

        sudo /etc/init.d/openerp-server restart
              
If you do not want to kill process than you can also stop OpneERP process by this command.it will also resolved this error

        sudo /etc/init.d/openerp-server stop


Thanks,

Mayur Maheshwari

Debug Mode in OpenERP 7.0 Web Client


Hello,

    I wanna like to share how to start OpenERP web-client in debug mode.IF you active a debug mode in web-client then You can access following functionality which is more helpful for openerp developer.

  •  Id [Id of record]
  • View Fields Information
  • Set Default Field Values [For one or All User]
  • Manage Filter
  • Technical Translation
  • Manage View with Editor
  • Edit Tree View
  • Edit Search View
  • Edit Form View
  • Edit Action
  • Print & Edit Workflow IF it Exists.
  • Enabele Toggle form Layout
  • JS Test


 


Thanks,

Mayur Maheshwari

Anonymization in openerp

Hello

              This article describes how data anonymization works in openerp. For Privacy, security, legal, proprietary ownership, and other economic complications often prevent distribution of business data.here openerp brings you a good way to prevent data by method of anonymization

Anonymization :- A process that removes or replaces identity information from a communication or record. In short  hiding identity or information.Anonymized data allows organizations to release personal information into the public domain

De-Anonymization :-  is a data mining strategy in which anonymous data is cross-referenced with other data sources to re-identify the anonymous data source. Any information that distinguishes one data source from another can be used for de-anonymization.


How it works ?

It simply replaces the fields data by ‘XXX’ characters and when you reverse the anonymization process it will replace the ‘XXX’ by the original content.

Anonymization:- 
 
   Convert Normal Data  --> Anonymized data(XXX pattern)
    Ex: opneerp -> XXX01

De-Anonymization:-

  Convert Anonymized data(XXX pattern) --> Normal Data (reverse process)
   Ex: XXX01 --> opneerp

Require module :
    anonymization

steps to do database Anonymization in OpenERP:

1]. Install Anonymization Module

anonymization_in_openerp

















2]. Browse this menu [ Settings/Database anonymization/Anonymize database  ] open wizard and set proper field name which you want to Anonymized after then click on  anonymize database button so it will create a one pickle file you can say its past database dump. Don’t forget to save this  file on a safe place because you will not be able to revert the anonymization without this file. mainly This file by default store in home folder
   ex : /home/local/field_anonymization_ann_9.pickle [filename]

Note: let you make sure Before executing the anonymization process, you should make a backup of your database.



anonymization_in_openerp
















3].Anonymization successful [ you can see name format in XXX01, XXX07 ]

anonymization_in_openerp



























4]. Now for geting actual data reverse process means De-Anonymization select your pickle file and click on reverse the database anonymization

anonymization_in_openerp












Anonymization process:-



Cheers Enjoy OpenERP :)

Thanks,

Mayur Maheshwari 






Change language in OpenERP 7.0

Hello,

       "Language" a one word used for better communicate in global world. but mostly all we prefer own language for daily routine life. If any Application or interface is in own language then we can use more friendly, Here openERP brings for you multi language concept which is more faster , more user friendly and simple to translation in one language to another language.

    OpenERP already has translations in almost all the popular languages. These translations are bundled within the modules itself.Here i am trying explain how to load a new language in OpenERP

In order to proceed, please follow these simple steps:

1] Load a Translation:-

 
    First of all you have login with admin user. Now browse following menu  


             Settings/Translation/Load a Translation


    Open this wizard  and chose a appropriate language in language field. Only those language will be translated which are set to be in this selection field.
          Ex:- language => Arabic













Overwrite Existing Terms:- If you check this box,Your customized translation overwritten and replaced by the above language 

2] Active language & Refresh browser:

    you can active language with two ways
  
    First way : open user form [settings/users/user] and update language field with new language










 






Second way: open preference 













Set language in preferences wizard

















Thanks,

Mayur Maheshwari