Odoo Help

Welcome!

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.

0

Invoice customer reference

By
kim
on 3/25/13, 10:56 PM 2,488 views

Hi,

I am using OpenOffice Designer to do my Invoices report. Do anyone know what is the code for the customer reference because i try to use [[ o.client_order_ref ]] but seem like not working

1

Omal Bastin

--Omal Bastin--
1146
| 6 6 8
Kochi, Kerala, India
--Omal Bastin--

Swiming deep into openERP/ODOO

Omal Bastin
On 3/26/13, 4:06 AM

In invoice name field holds the customer reference. so you can use [[ o.name ]] to get the customer reference

hi i use the [[ o.name ]] but not working

kim
on 3/26/13, 10:55 PM
0
jamesbale
On 3/26/13, 2:45 AM

You can not directly get client_order_ref, it is sale order field.

def _get_client_order_ref(self, data):

    ref = ''
    sale_obj = self.pool.get('sale.order')
    sale_ids = sale_obj.search(cr, uid, [('origin', '=', data.origin)]
    if sale_ids:
        ref = sale_obj.browse(cr, uid, sale_ids[0]).client_order_ref
    return ref

you have to do something like this

can i know this code put under python file?

kim
on 3/26/13, 10:56 PM

I'm actually interested in something similar. I would like to display the customer reference on a task associated with the sales order. thanks!

Andrew
on 4/9/13, 5:38 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)

Stats

Asked: 3/25/13, 10:56 PM
Seen: 2488 times
Last updated: 3/16/15, 8:10 AM