Archive

Posts Tagged ‘Invoice’

OpenERP module of the day: base_crypt (or encrypting your user password in OpenERP)

February 22, 2011 2 comments
Category:WikiProject Cryptography participants

Image via Wikipedia

This is a quick post. I found this base module which is quite useful and I wanted to share it with you. The module is base_crypt and it encrypts user passwords in the OpenERP database. By  default OpenERP stores user passwords in the res_users table, they are stored in plain text in the password field. base_crypt module encrypts all passwords with the MD5 algorithm. Below is the link for downloading the module:

http://doc.openerp.com/v5.0/technical_guide/base_crypt.html

IMHO, this module should be part of core since it is a good security practice to store passwords in encrypted form. In some places it is mandated by law. It is also a nice module to look at, checking its code is fun.

Cheers!

Advertisements

OpenERP module of the day: sale_delivery (or managing open orders)

February 20, 2011 Leave a comment
Invoice

Image via Wikipedia

Quick Sunday post. The sale_delivery module allows you manage open orders on OpenERP. An open order is when your client orders from you a product that needs to be delivered in multiple packings. After installing the module, every time you create a sales order you will notice a new tab with the delivery planning. There you will be able to enter when  you are planning on when and how many units of your product you are planning on delivering. Later, you will be able to invoice the customer from packing

Where is this module useful? In places like Argentina. Many businesses have open orders with their clients. This is a very common use case. Other common use cases are invoicing (that is the first one) and managing stock. Not surprisingly financial accounting is not on the list, since a huge size of the economy is informal.

Have a good Sunday!

OpenERP module of the day: account_invoice_salesman

February 3, 2011 1 comment

Last week a customer asked us how to enter the salesman information on the invoice. He needed to keep track of which salesman was selling what. My instant answer was “you could do that with analytic accounts”, but told him I would check it. And I found the account_invoice_salesman module.

This module can be downloaded from the  documentation page. No need to use bazaar for this. You can either download it with your browser or with this command (in case you are using Linux)

# wget http://www.openerp.com/download/modules/5.0/account_invoice_salesman.zip

Next step is to import the module and install it. The installation is quite straightforward and does not need any configuration. What does module do? Two things

  1. Creates the user_id field in the account.invoice class, with the “Salesman” label. This field references the res.users class, so each salesman nees to have a user created in OpenERP
  2. Adds the Salesman field to the account_invoice form

Below is a screenshot of the invoice form

Cheers!

First steps in OpenERP 6.0. Creating and configuring the company

Polish OpenERP screenshot

Image via Wikipedia

The best way to know OpenERP is to try it. Developing a proof of concept. That is how you will get to know what are the possibilities of this system, what it takes to configure it, get a good grasp on the community and the time it takes to implement it. You can do it alone or guided with a consultant. Both ways work, a consultant will save you a lot of time.

So, how do you start? Well, the first step is to install it and have it running. I will not go into the details on how to install it, I can only recommend buying a VPS Linux server (there are two or three which have are excellent and are affordable). Then you can follow the detailed steps on how to install OpenERP on the documentation pages.

What I am going to talk about now is what you should do first in order to know the system. This is covered in the OpenERP book in the First Steps in OpenERP. You should read it (I encourage you to buy the book since it is an excellent read and for $40 it will save you lots of hours). The idea is to configure a system that buys products from suppliers (and pays them), manages the stocks of those products and sells those products to customers (while collecting their payments). Pretty much what every other company in this world does in order to make a living.

What should we do first? Well, I assume you already have OpenERP up and running. So we are going to set up the company. You do this by selecting the Administration > Configuration > Companies menu (in OpenERP 6.0):

Click on Companies and you will see the list of the companies already configured in your system. Click on the New Button to create a new one. You will see a form like this:

This form has a header and six tabs. On the header you only need to enter the Company name. Then in the General Information tab you should be able to enter the main currency for the company (more on this in later posts), header and footer information and the company logo (which will be printed in the many forms that are used by OpenERP).

You have two more tabs for customizing the Header and footer, along with its internals. We will not get into those items at this time. If you go to the Configuration tab you should be able to configure some parameters for the system, such as the Timesheet range or the Reserve Profit/Loss account. But this is taken care of in more detail in the Parameters section of the system. Same with the Other tab.

Skip the Other and Overdue Payments tabs since they are not necessary to configure by now.

After you have configured the company, you can go to the next section, which is configuring account types. But we will go into that in a latter post.

Cheers,

Configuration parameters in OpenERP

January 12, 2011 5 comments

One of the first things you need to configure when you start working with OpenERP is setting its parameters right. Parameters are default values taken by the system while it performs certain operations. For instance, which default pricelist to use while creating a Sales Order. Or the account to debit while creating an invoice.

You can find the Parameters list in the Administration >> Configuration >> Configuration Parameters menu option

You will see a list with over ten parameters; parameters such as account_expense, account_receivable, product_pricelist, etc. Just select a parameter and assign a value to it. I will give you an example. You want your new Sales Orders and Invoices to use a new Pricelist (named Promotional Pricelist). In order to do so, you can select the property_product_pricelist and assign it the value of Promotional Pricelist. Then save it. After that, all your new invoices and sales orders will use the Promotional Pricelist.

You can also create new properties you can use in your custome modules. Just enter a name for it, select the Company which will be using it, the fields the parameter will be applied to, and then which value (and value type) can be assigned to it.

Hope this information helps,

Customizing printed invoices in OpenERP

December 27, 2010 3 comments

These are some things I learnt past week while I was configuring invoices.

Printed invoices in OpenERP are reports. So, if you modify the graphical design of your invoices, such as the logo, all the reports in the system will be modified with the changes you just made. Last week I had to configure the system to print invoices in preprinted forms. To do that I had to remove the header and footer from the invoices, but doing so I modified all the reports I had already created. Until I figured out what to do.

This is what I did. In the administration menu, I selected the Companies->Companies item.

 

In the companies list you have to select your company and click on the Header/Footer tab. In this tab you will be able to modify the XML code that is printed on every report. You can remove the header by deleting all the lines between the and tags.

<header>
</header>

This clears the header for the first page of the report. If you would like to remove the header for the inner pages in the report, you have to do the same in the XML code in the Internal Header/Footer tab. This will remove in all the reports the headers, but will not remove the logo. In order to do that, we have to select the General Information tab and remove the logo picture file over there.
After removing the redundant text, we have to generate the report for the invoice. The design of the report can be found in the file system of the server where OpenERP is installed. This design is a XML file named invoice.rml. You can find it in the addons directory. I found it with the following command in my server:
find . -iname invoice.rml
You can edit the file in order to change the layout and the elements printed in the invoice. I recommend making a backup copy before making any changes to the report file. The file format is RML, which stands for (I believe) Report Mark-up Language. It is a mark-up language developed by the development group at ReportLab. You can find more information on this format in this document.
This file has three important markers: template, stylesheet and story. We are interested on two of them, template and story. With the template marker we will describe the report layout, with the story marker we will describe the content itself.For instance, we can define sections for the current date, the customer and its address:
<pageTemplate id=”first”>
<frame id=”date” x1=”13.5cm” y1=”21.5cm” width=”5.5cm” height=”1.2cm”/>
<frame id=”partner” x1=”3.5cm” y1=”18.9cm” width=”15.5cm” height=”1.2cm”/>
<frame id=”address” x1=”4.0cm” y1=”18.0cm” width=”15.0cm” height=”1.2cm”/>
</pageTemplate>

 

In order to assign text to each section is:

<story>
<para style=’body’>31/12/2010</para>
<nextFrame/>
<condPageBreak height=”12″/><para style=’body’>Cristian Sebastian Rocha</para>
<nextFrame/>
<condPageBreak height=”12″/><para style=’body’>Av. Rivadavia 555</para>
</story>

We can retrieve the customer information from the system with the following python code:
<story>
<para style=’body’>[[ formatLang(o.date_invoice,date=True) ]]</para>
<nextFrame/>
<condPageBreak height=”12″/><para style=’body’>[[ o.partner_id.title or ” ]] [[ o.partner_id.name ]]</para>
<nextFrame/>
<condPageBreak height=”12″/><para style=’body’>[[ o.address_invoice_id.street ]]</para>
</story>
This is more than enough to print on pre-printed invoices forms.
Cheers!