Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


How can I display the Delivery Address on the invoice?

on 4/8/13, 10:54 AM 7,419 views

I am looking for a way to display the delivery address on the invoice layout. So far everything I've tried through the report editor isn't working as intended. I have tried referring to the o.sale model, but it seems the values can not be found.

I have come across many posts describing a similiar problem. I'll refer to the links below to ask my question.

Is there a module for v7 which I can install/find and use to display the Delivery Address on my invoices? Or do I have to write my own code, like suggested in the last link?

I'm a bit of a novice at writing code, so before I get started on this - I just wanted to inform if there was a quciker/better way to accomplish this?

A reference to the Sale Address Multi Partner module

The Module for 6.1

An answer to a problem similar to mine, involving writing code arround self.pool.get('res.partner').address_get

On 4/12/13, 6:05 AM

I settled for a work-arround. I used the note-field to display my delivery address, and change it's position and format using the OpenERP report designer. It sounds rather crude, but it actually works quite well.

I'll update my answer with a screenshot later. Either way, I "fixed" this problem.

On 7/17/13, 2:09 PM


I solved it like that:

created a custom field in account_invoice table like that:

class account_invoice(osv.osv):

_inherit = 'account.invoice'
_name = 'account.invoice'

_columns = {
  'x_shipping_id': fields.many2one('res.partner', 'Shipping Address'),

and then send field-value to invoice when invoice is created like that:

class sale_order(osv.osv):

_name = 'sale.order'
_inherit = 'sale.order'

def _prepare_invoice(self, cr, uid, order, lines, context=None):

    res = super(sale_order, self)._prepare_invoice(cr, uid, order, lines, context=context)
               'x_shipping_id': order.partner_shipping_id.id,
    return res

finally the shipping-address can be added easely on invoice-report

This is almost exactly what http://v6apps.openerp.com/addon/6739 does - I think I like you version better.

Bista Solutions US, Ray Carnes
on 7/17/13, 4:50 PM

Hello René, I went through your code but i did not get that where exactly i have to write this code and where exactly have to create file - sale_order . Please elaborate your ans in detail as I am new to openerp and python . Actually I created an additional field and successfully display on Quotation and Sale Order but not able to display on Account Invoice . Field is selection field F.Y.I I am using Openerp v7 . Please help me to display my additional field on invoice

Neha Y
on 10/16/13, 5:19 AM
On 9/17/14, 5:46 PM

I created issue #2421 (https://github.com/odoo/odoo/issues/2421) and pull request # 2380 (https://github.com/odoo/odoo/pull/2380) to resolve this for v8.

Andrea Cometa
On 9/4/13, 1:49 PM

HI, you can try this: lp:~scigghia/account-invoicing/adding_account_invoice_shipping_address_7



| 5 4 7
Baarn, Netherlands
On 4/8/13, 12:32 PM

When you go to the settings of openERP, at the option 'Sales' (under Configuration) you can tick the option 'Allow setting a discount on the sales order lines'. This allows you to specify different delivery address for an order, but by default it will give the same address as the address of the customer.

I'm sorry but I fail to see the correlation between allowing discounts, and being able to display my delivery address in the Invoice form. I still tried your method though, but all I gained was the field in which I can configure a discount per invoice/order-line.

To clarify: I can already choose an invoice- and delivery-address in my quotations and orders. I have accomplished this by activating the option to have a different invoice- and delivery-address under Settings --> Sales.

What I can not do is show this delivery address, which is showing on my quotations perfectly, on the invoices

on 4/8/13, 1:37 PM

Sorry I misunderstood your question. Thought you needed to display the different addresses. I also copied the wrong line, it had to be something you found on the same page, talking about different addresses.

on 4/8/13, 4:51 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 4/8/13, 10:54 AM
Seen: 7419 times
Last updated: 3/16/15, 8:10 AM