How to configure SMTP in OpenERP ?


I am writing this blog because when I got any questions in my mind I simply search it on google. I guess its usual thing that we all are taking help of our best friend Google, when we are in trouble.

So I thought to share with everyone and thinking that it might be helpful for other too. Because same problem can occur with any one.

So lets have a look at the video which will show you:
How to configure SMTP in OpenERP ?
How to Send Mail in OpenERP ?

OpenERP is a huge product and its not easy to cover everything by this kind of videos but I am trying my best to cover most important parts.

Feel free to ask for any queries if you have.

Advertisements

How Google managed to get all your private data and got away with it


Secrets spilled across the computer screen. After months of negotiation, Johannes Caspar, a German data protection official, forced Google to show him exactly what its Street View cars had been collecting from potentially millions of his fellow citizens. Snippets of e-mails, photographs, passwords, chat messages, postings on websites and social networks – all sorts of private Internet communication – were casually scooped up as the specially-equipped cars photographed the world’s streets. “It was one of the biggest violations of data protection laws that we had ever seen,” Caspar recently recalled about that long-sought viewing in late 2010. “We were very angry.” Google might be one of the coolest and smartest companies of this or any era, but it also upsets a lot of people – competitors who argue it wields its tremendous weight unfairly, officials like Caspar who says it ignores local laws, privacy advocates who think it takes too much from its users. Just this week, European anti-trust regulators gave the company an ultimatum to change its search business or face legal consequences. American regulators may not be far behind. The high-stakes anti-trust assault, which will play out this summer behind closed doors in Brussels, might be the beginning of a tough time for Google.

But never count Google out. It is superb at getting out of trouble. Just ask Caspar or any of his counterparts around the world who tried to hold Google accountable for what one of them, the Australian communication minister Stephen Conroy, called “probably the single greatest breach in the history of privacy”. The secret Street View data collection led to inquiries in at least a dozen countries, including four in the US alone. But Google is yet to give an explanation of why the data was collected and who at the company knew about it. No regulator in the US has ever seen the information that Google’s cars gathered from the citizens. The tale of how Google escaped a full accounting for Street View illustrates not only how technology companies have outstripped the regulators, but also their complicated relationship with their adoring customers. Companies like Google, Amazon, Facebook and Apple supply new ways of communication, learning, entertainment and high-tech wizardry for the masses. They have custody of the raw material of hundreds of millions of lives – the intimate e-mails, the revealing photographs, searches for help or love or escape. People willingly, at times eagerly, surrender this information. But there is a price: the loss of control, or even knowledge, of where that personal information is going and how it is being reshaped into an online identity that may resemble the real you or may not. Privacy laws and wiretapping statutes are of little guidance, because they have not kept pace with the lightning speed of technological progress.

Source: The Economic Times

What does a cloud offer? – Cloud: What is it?


Cloud has myriad of definitions, but one thing is clear that the IT industry is largely accepting it as the next phase of service delivery. Here, we tell you what it means

Cloud, cloud computing, software-as-a-service (SaaS), platfrom-as-a-service (PaaS), infrastructure-as-a-service (IaaS), hosting, cloud storage, private cloud, managed cloud, public cloud or hybrid cloud – there was a time when you would have drawn a blank face at the utterance of these terms. Today, they are no more aliens, and it is rare to meet someone who is closely, or even not so closely, associated with the world of information technology (IT) and has not yet come across them at some  point. Vikram Bhatia, Windows Azure Lead, Microsoft, says: “While talking to CXOs at a few medium to large enterprises about cloud, I was pleasantly surprised to see the change in the content of their concerns and queries over the last two years. Two years ago, the two most common questions I had to address were: (i) what is this “cloud” business? Isn’t that marketing jargon for hosting? And (ii) what about the security of my data?” True, cloud was a mere hype back then that not many CIOs were serious about and looked upon with caution. More so because the technology in itself was not clear, and moreover, the private/public/hybrid varieties only worsened the confusion. No, we are not getting into the private vs public vs hybrid cloud frontier. That is entirely a different game altogether, something we might take up later. For now, it is just cloud, without its prefixes and suffixes.

In an interview sometime back, Andy Jassy, senior VP, Amazon Web Services, had noted: “We find all those terms such as private cloud, public cloud, hybrid cloud, infrastructure-as-a-service, platform-as-a-service, as a kind of overloaded and confusing terms. It is often the old world IT players, who talk about it, because private cloud protects the business or margin structure that they built over the past 30 years.” The frenzy back then was such that every second company wanted to reach out to the market with its ‘cloud services’. Even today, not all the CIOs are open to the idea, however, at least most of them agree that it is indeed a new form of doing one’s business. “A year later, I saw a shift happening. It is no longer about what is the cloud, but more about what can I effectively do with the cloud. The two most common queries I get today are: (i) is the cloud worth it for me? What about my existing investments (read hardware, software licenses or in-house apps)? And (ii) How will I manage cloud-based apps? Won’t this make my environment more complex? This shift in concerns tells me that the market has matured considerably and enterprises have evolved from being skeptics to adopters,” Bhatia adds.

There was a time when every executive one spoke to would have a definition or two of the cloud, which seemed more suitable to the service that they were trying to sell than something that a user wanted to hear. However, with time this has also changed. The IT industry has come to terms with technology and has started to accept it as the next phase of IT service delivery. We would try and bring to you what it means and why not all that shines out there is a cloud. To begin with here is a simple definition of what cloud is. Pradeep Agarwal, country head – India Enterprise, Google, said: “’Cloud computing’ refers to Internet-based computing, where software and information in data centres is sent over the Internet to computers, cellphones, and other devices. This technology enables people to quickly turn on applications and innovation like a utility, instead of having to install and run their own applications. Data can be accessed from any Internet-connected device.” And to put it in a simpler form, “The cloud is a service you use, not a system you build,” says Peter Coffee, VP and head, Platform Research, salesforce.com.

And if that is also not sufficient, here is a bit from its history. “What started as “co-location” a few decades ago, i.e. shared hosting of one’s servers in a third party data centre, soon evolved into ‘hosting’, which means servers owned and managed by a third party rented out to multiple organizations for running their business applications. The next stage in the evolution was outsourcing, or better yet, total outsourcing, which moved not only the machines and software, but also human resources and services to third parties. Cloud happened in the last few years, driven primarily by the need to drive down costs further through both scale and scope, but made possible because of technologies like virtualization and remote application management,” adds Bhatia.

Source: CIOL World

How to create a module in OpenERP ?


It is very easy to create a module in OpenERP.

Find the below displayed screens. We will code to result this output.

Tree View

Form View

Few files needs to be created compulsory. We will take an example let say – “test_module”

First of all, we will see the architecture of a typical OpenERP module.

  1. __openerp__.py
  2. __init__.py
  3. Python files
  4. XMLFiles
    1. Actions
    2. Menu Entries
    3. Reports
    4. Wizards

All the modules are located in server/addons directory.

The following steps are necessary to create a new module “test_module”:

– create a subdirectory in the server/addons directory having module name test_module.

– create a module description file: __openerp__.py

– create the Python file containing the objects.

– create .xml files that download the data (views, menu entries, demo data, …).

– optionally create reports, wizards or workflows.

We will see each files introduction one by one.

The __init__.py file:

The __init__.py file is, like any Python module, executed at the start of the program. It needs to import the Python files that need to be loaded.

So, if you create a “test_module.py” file, containing the description of your objects, you have to write one line in __init__.py:

import test_module.py

The __openerp__.py file

In the created module directory, you must add a __openerp__.py file. This file, which must be in Python format, is responsible to

  1. determine the XML files that will be parsed during the initialization of the server, and also to
  2. determine the dependencies of the created module.

This file must contain a Python dictionary with the following values:

{
"name" : "Test Module",
"version" : "1.1",
"author" : "Open",
"category" : "Test Base/Test Base",
"depends" : ["base"],
"init_xml" : [],
"demo_xml" : [],
"update_xml" : ["test_view.xml"],
"installable": True,
"active": True
}

The test_module.py file

from osv import osv

from osv import fields

class test_base(osv.osv):

    ”’Test Base Class”’

    _name=‘test.base’

    _columns={

            ‘name’:fields.char(“Name”,size=128,),

            ‘code’:fields.char(Code,size=64)

    }

test_base()

The text_view.xml file

<?xml version=“1.0” encoding=“utf-8”?>

<openerp>

    <data>

       <record model=“ir.ui.view” id=“test_base_form”>

           <field name=“name”>test.base.form</field>

               <field name=“model”>test.base</field>

               <field name=“type”>form</field>

               <field name=“arch” type=“xml”>

                   <form string=“Test Base”>

                       <field name=“name”/>

                       <field name=“code”/>

                   </form>

              </field>

        </record>

        <record model=“ir.ui.view” id=“test_base_tree”>

            <field name=“name”>test.base.tree</field>

            <field name=“model”>test.base</field>

            <field name=“type”>tree</field>

            <field name=“arch” type=“xml”>

                <tree string=“Test Base”>

                    <field name=“name”/>

                    <field name=“code”/>

                </tree>

            </field>

        </record>

        <record model=“ir.actions.act_window” id=“action_test_seq”>

            <field name=“name”>Test Base</field>

            <field name=“res_model”>test.base</field>

            <field name=“view_type”>form</field>

            <field name=“view_mode”>tree,form</field>

        </record>

        <menuitem id=“menu_test_base_main” name=“Test Base”/>

        <menuitem id=“menu_test_base” parent=“menu_test_base_main”

                  name=“Test Base” action=“action_test_seq”/>

    </data>

</openerp>

How to backup and restore OpenERP database ?


There are two methods to perform backup and restore operation for OpenERP database.

Lets go through step by step:

Method 1: Using GUI

Follow the steps to create backup and restoring database.

1) Goto Login page,
2) Click on Manage Databases,
3) There are various options available on left side bar.
4) Follow the screens displayed below.

OpenERP database backup
OpenERP database backup
OpenERP database restore
OpenERP database restore

Method 2: Using command prompt (Using PostgreSQL)

It is advisable that if backup has been taken from command prompt then restoring should be from command prompt only.

Follow the screen steps for creating backup and restore.

1) Executing following command will create a blank database.
Command: createdb –encoding=UTF-8 testdb

Create blank database
Create blank database

2) Executing following command will create a backup of database : openerp_61
Command: pg_dump -f backup_openerp_61 openerp_61

OpenERP database backup from command prompt
OpenERP database backup from command prompt

3) Execute following command will restore your db into blank database created in step 1.
Command: psql testdb < backup_openerp_61

OpenERP restore database from command prompt
OpenERP restore database from command prompt

Problem during restoring from command prompt :

Upto here, assume that everything is working in the same PC. Now let say, someone is trying to restore database using command prompt for which, the database has been backed up from another PC.

Please check following screenshots.

OpenERP database backup process
OpenERP backup database process

In above case, You can see the error message `role “john” does not exist`. It means that database has been backed up from another PC having name is ‘john’.

So now, in this case there are two solutions to restore this database as follows.

1) Either you can open dump file, and change the role name wherever you find name ‘john’ as your role displayed in following screen. Here I have changed name as ‘navrang’ in place of ‘john’.

OpenERP restore database process
OpenERP restore database process

2) Another option is, if dump file is too long to change role/owner name, then you can create a user in your PC named ‘john’ so it will work as it is.

And this way we can restore our database.

SAP teams-up with Amazon Web Services – To offer customers cloud-based option for mobile device and application management


SAP AG (SAP) announced that SAP Afaria mobile device management solution is now available on Amazon Web Services (AWS) Marketplace, at Sapphire Now, being held in Orlando, Florida, May 14-16, 2012. The AWS Marketplace will feature fully configured SAP Afaria 7.0 server, which brings a new user interface, consumer-like app portal with SAP Store integration and mobile analytics dashboards for business intelligence (BI) reporting. “As the cloud rapidly becomes the IT deployment model of choice for business of all sizes, Amazon Web Services is excited to be working closely with SAP in bringing enterprise solutions to the cloud,” said Andy Jassy, senior vice president, Amazon Web Services. “Adding SAP Afaria to AWS Marketplace provides customers a fast, simple and trusted way to shop for and implement an enterprise-ready mobile solution.” SAP Afaria can be found by visiting http://aws.amazon.com/marketplace “By offering SAP Afaria on the secure, scalable AWS cloud infrastructure, we are extending our existing close relationship with AWS and making it as easy as possible for customers and partners to test and deploy the industry’s leading mobile device management solution in an economical and reliable fashion,” said Sanjay Poonen, president, Product Go-to-Market, and head of Mobile Division, SAP. “This announcement is just a sneak preview of what’s coming from SAP as we lay the ground work for long-term innovation around our comprehensive, unmatched B2B and B2C mobile platform – both on premise and in the cloud.”

Source: CIOL Bureau

Apple may attempt to push Android Tabs off market


In an attempt to counter the burgeoning number of Android Tab market, tech giant Apple is releasing an ”iPad Mini” at a loss-making price of around 150 pounds. The low priced tablet will even feature the same ”Retina” display featured on its big brother, iPad 3, bringing the same 3.1million pixels to a smaller 7-8″ display. With the screen as a premium feature, it is likely Apple would have to compromise on other parts of the tablet, such as reduced storage space of, for instance, 8GB for apps, videos and music. According to the Daily Mail, tech analysts claimed that if such a stance in adopted by Apple, the firm might have to take a serious cut to its margins, if not sell the Mini at a loss. “Considering the kind of cash Apple has on hand, though, it might be willing to take the hit just to help kill-off competition from Android tablets,” IMore was reported, as saying. However, it expected to appeal people who want an iPad for casual browsing and occasional use of apps and movies, but are not willing to shell out 400 pounds for the bigger brother.

Source: The Financial Express