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

client_order_ref under sale.order.line?

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

Hello,

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.

kaynis
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.

Bista Solutions US, 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

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: 1/7/14, 12:17 PM
Seen: 1025 times
Last updated: 3/16/15, 8:10 AM