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

inherit search view in openerp7

By
548
on 5/17/13, 1:12 PM 5,342 views

Hi, I want to add group by.... and Filters in default CRM. Can any one help me how to inherit the view in my custom module.

what is the object exactly you want to add group by and Filter ?

Borni DHIFI
on 5/17/13, 1:15 PM

I have create a function for current week and current month so i want to add the filter which will filter by monthly leads and weekly lead

548
on 5/17/13, 1:17 PM
7

Borni DHIFI

--Borni DHIFI--
5102
| 6 8 9
Tunis, Tunisia
--Borni DHIFI--

Techno Functional Consultant Odoo(OpenERP) 

http://www.linkedin.com/in/borni

Skype : dhifi.borni

Borni DHIFI
On 5/17/13, 1:51 PM

Hi,

For example add a filer name ='Patel' and add a groupe by name.

         <record id="inherit_view_crm_case_leads_filter" model="ir.ui.view">
            <field name="name">CRM - Leads Search </field>
            <field name="model">crm.lead</field>
            <field name="inherit_id" ref="crm.view_crm_case_leads_filter" />
            <field name="arch" type="xml">

               <!-- add your filtre at the end -->
                <xpath expr="filter[@string='Assigned to My Team(s)']"
                    position="after">
                     <filter string="My Filtre "
                            domain="[('name', '=', 'Patel')]" />
                </xpath>

               <!-- add your group at the end -->
                <xpath expr="//filter[@string='Creation']"
                    position="after">
                    <filter string="My Groupe" domain="[]" context="{'group_by':'name'}"/>
                </xpath>                                    
                </field>
            </record>

Thank You.

Thank you so much

548
on 5/17/13, 2:06 PM
0
B.hind
On 10/27/16, 6:50 AM

hi , please when i try like this method i get error i work in odoo 8

               <record id="view_hr_holidays_filter" model="ir.ui.view">       

<field name="name">hr.holidays.filter</field>    

    <field name="model">hr.holidays</field> 

<field name="inherit_id" ref="hr_holidays.view_hr_holidays_filter"/>    

  <field name="priority" eval="16"/>       

<field name="arch" type="xml">                                                   

<xpath expr="//filter[@string='group_category']"    position="after">                 

  <filter string="state" domain="[]" context="{'group_by':'state'}"/>   

             </xpath>

</field>   

</record>

the error :

ParseError: "Wrong value for ir.ui.view.type: 'filter'" while parsing /opt/odoo/addons/holidays_aurs/holidays_views.xml:5, near<record id="view_hr_holidays_filter" model="ir.ui.view">        <field name="name">hr.holidays.filter</field>        <field name="model">hr.holidays</field>        <field name="priority" eval="16"/>        <field name="arch" type="xml">                                                    <filter string="state" domain="[]" context="{'group_by':'state'}"/>        </field>    </record>

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: 5/17/13, 1:12 PM
Seen: 5342 times
Last updated: 10/27/16, 6:50 AM