Filtering in one2many fields -OpenERP

Last week I got into a situation that I really need to use filtering in tree view of one2many field. I have seen the use of filtering in search view, but not in tree view of a one2many field.
Example:
Note:this is just an example.
I have created a sale order. Here same product comes 2 or 3 times.

Then I was thinking for a solution… then came to find out that we can pass the filter condition in one2many fields as we provide in search views.

<code><field name=”order_line” mode=”tree,form” colspan=”4″ nolabel=”1″ widget=”one2many_list” context=”{‘group_by’:’name’}”></code>

Then I was able to get the filter view.

You just need to provide context=”{‘group_by’:’field_name’}”.Here field_name is the name of the field in the tree view of the one_2many field.

Comments

Leia: Hi, I chehk your blog on a regular basis. Your writing style is witty, keep up the good work!".

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. hyatto says:

    Very interesting information, I tested with ( context=”{‘group_by’:’field_name’}” ) and it works only in GTK.

    1. ssa says:

      Thank you for the interesting hint.

      1. Huy says:

        i want group by one2many list in web client 7.0, what should i do ? help !

    2. Omal Bastin says:

      It works in web client too. But you have to open the record for editing to see this view.

      1. Sean says:

        It seems that the new web enginee in 6.1 doesn’t support it, even in editing mode.

      2. ishu says:

        I am not getting it..please help

  2. vishnu says:

    An interesting Discovery… 🙂

  3. Anonymous says:

    thankssss for share with us

  4. ishu says:

    I have done the same but not getting the result..m using 6.1 version.please help me to sort out the problem

    1. chick23 says:

      you sure? care to explain? just thought i'd ask 🙂

      1. Boyd says:

        Appreciating the time and energy you put into your website and detailed information you provide. It's great to come across a blog every once in a while that isn't the same old rehashed information. Wonderful read! I've saved your site and I'm including your RSS feeds to my Google account.

      2. Leia says:

        Hi, I chehk your blog on a regular basis. Your writing style is witty,
        keep up the good work!

    2. omalbastin says:

      Hi,

      Its not working in openrp v6.1 web client. Only works with gtk- client

  5. Does The Fat Loss Factor Works says:

    Heya exceptional website! Does running a blog such as this take a great deal of work? I've no understanding of coding however I had been hoping to start my own blog soon. Anyway, should you have any ideas or techniques for new blog owners please share. I know this is off subject however I just had to ask. Many thanks!

  6. The Fat Loss Factor Review says:

    At this moment I am going to do my breakfast, afterward having my breakfast coming over again to read more news.

    1. Marcel says:

      Nice post. I was checking constantly this blog and I'm impressed! Extremely helpful info specially the last part 🙂 I care for such info a lot. I was looking for this certain info for a very long time. Thank you and best of luck.

  7. Anonymous says:

    Hi, good tutorials thanks.
    I try to use this exactly like you do but doesn’t wor in GTK or web. Using 6.0.4 version. Editing /sale_view.xml ln 124.



    Thanks

  8. Does the tao of Badass Works says:

    Spot on with this write-up, I seriously believe this website needs a great deal more attention. I'll probably be back again to read more, thanks for the info!

  9. The Tao Of Badass Review says:

    Hello, i think that i saw you visited my blog so i came to “return the favor”.I am attempting to find things to improve my website! I suppose its ok to use a few of your ideas!!

  10. Does Plan My Baby Works says:

    Does your site have a contact page? I'm having trouble locating it but, I'd like to send you an e-mail. I've got some creative ideas for your blog you might be interested in hearing. Either way, great blog and I look forward to seeing it improve over time.

  11. themultiorgasmicloverreview.com says:

    Howdy I am so glad I found your site, I really found you by error, while I was searching on Google for something else, Anyways I am here now and would just like to say thanks for a remarkable post and a all round exciting blog (I also love the theme/design), I don't have time to read through it all at the moment but I have book-marked it and also included your RSS feeds, so when I have time I will be back to read more, Please do keep up the great work.

  12. Huy says:

    i want to group by one2many list in web client of openerp 7.0 all in one , what should i do ? help !

  13. Huy says:

    i wanto group by one2many list work in web client 7.0 , what shold i do ? help !

© 2020 Zesty Beanz Pvt Ltd All Rights Reserved.