Odoo Help


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

Victor Admin
on 8/28/14, 10:04 PM 1,291 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


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

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!




Cyril Gaspard (GEM)

--Cyril Gaspard (GEM)--

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

Forum contributor since 2008

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


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 :



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

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: 8/28/14, 10:04 PM
Seen: 1291 times
Last updated: 3/16/15, 8:10 AM