Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
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
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!
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 :
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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 8/28/14, 10:04 PM|
|Seen: 1232 times|
|Last updated: 3/16/15, 8:10 AM|