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.

1

[Solved] How do I embed customers' list of sales orders into their res.partner.form?

By
Victor Admin
on 8/28/14, 10:04 PM 882 views

I am trying to show a list of all sales orders associated with a customer right there on the front page of their partner form, but I can't seem to wrap my head around how to accomplish this. I'm sure it's quite simple and illustrates my lack of understanding of a core Odoo concept, even though I've done a ton of other customizations. I don't have enough Karma to upload a picture, but I made a mockup of what I'm trying to accomplish in case my description doesn't make sense

http://imgur.com/pa2pDy

I am on OpenERP 7

[Edit] This is now solved, but I seem to be unable to mark my own question as solved =) the solution is in a comment I made

1
Victor Admin
On 9/2/14, 5:31 PM

I accidentally stumbled onto a perfect solution when searching for documentation on how one2many fields work, and the answer to my question is actually built into OpenERP - sales_order_ids

<field name="sale_order_ids"> </field>

I simply added this to the partner form and the result is basically identical to my mockup. Thanks for the help though, I really need to grasp how to properly use one2many, as it seems like a core concept in how this thing works. Hopefully this will help some more people!

 

 

1

Cyril Gaspard (GEM)

--Cyril Gaspard (GEM)--
4136
| 5 6 8
Paris, France
--Cyril Gaspard (GEM)--

Forum contributor since 2008

Cyril Gaspard (GEM)
On 8/28/14, 10:34 PM

Hi,

for that, define a fields.function with type='one2many', you could find an example in some modules by searching a little ...

the function will return the list of sale order associated to the partner id

or see this example :

http://stackoverflow.com/questions/23513942/what-do-i-return-for-function-field-value

Bye

Thank you for pointing me in the right direction, I will be spending most of the day on this and will report back with my progress

Victor Admin
on 9/2/14, 4:18 PM
0
E.R. Spada II
On 8/29/14, 2:28 AM

You can use a module from URSA, partner_buttons. Adds quotations, Invoices, and Delivery Order to the partner view.

Thanks for the response, but this module seems to only add buttons, and I am trying to embed the actual list of sales orders into the partner view

Victor Admin
on 9/2/14, 4:17 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: 8/28/14, 10:04 PM
Seen: 882 times
Last updated: 3/16/15, 8:10 AM