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

Filter by attribute of an attribute on a view

By
Célia Couiller
on 12/1/16, 4:35 AM 53 views

I'm trying to filter a view 


I have a system of class like this :

class GrandParent(models.Model):
    [...]
class Parent(models.Model):
    grand_dad_id=fields.Many2One('GrandParent')
    children_ids=fields.One2Many('Child)
    [...]
class Child(models.Model):
     dad_id=fields.Many2One('Parent')
     [...]

And when cliking on a grandParent kanban card I would like to display his "family" : his grand children (class child) grouped by parent
I don't know how to acess the "grand_dad" property.
I tried something like :
<record id="view_child_search" model="ir.ui.view">
[...]
<search string="User Stories">
<!-- <field name="dad_id.grand_dad_id"/> -->
[...]
</record>
With in the action on the grand_parent card :
{'search_default_parent':active_id}

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: 12/1/16, 4:35 AM
Seen: 53 times
Last updated: 12/1/16, 4:50 AM