Odoo Help


client_order_ref under sale.order.line?

Neil Gaskell
on 1/7/14, 12:17 PM 1,409 views


I'm trying to add the customer's order ref from the originating sale.order to the list view of "Order lines to invoice" - I can't see how to reference that field though; and I'm not sure how to find out if it's brought through under a different name (e.g. it's partner_ref or 'name' in other places)

Any suggestions gragefully received!

Thanks in advance, Neil

You will need an on change function so get this done. a function that picks the ref when he sales order is confirmed. Then you will need to inherit the invoice class where you want to display it and add a field ref where the ref from sales order will be displayed.

on 1/7/14, 1:30 PM

This module https://www.openerp.com/apps/6.1/account_invoice_client_order_ref/ should get you started - remember that there can be more than one sale order represented by a single invoice, that's why this module only grabs the first one.

Ray Carnes
on 1/7/14, 9:00 PM

Thanks guys, I was poking around in sale.py and managed to create a lot of error messages - my Python is not great - will have a look through that module for ideas :)

Function 44 Ltd, Neil Gaskell
on 1/8/14, 6:45 AM

Just to update this, a small function added to the sale_order_line class, and the column added by fields.function was able to bring the client_order_ref through. Each order line can only belong to one sale order and therefore one client ref so I am happy this way. Thanks for your help chaps.

Function 44 Ltd, Neil Gaskell
on 10/22/14, 7:13 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 1/7/14, 12:17 PM
Seen: 1409 times
Last updated: 3/16/15, 8:10 AM