Odoo Help


go to a filtered view search from a button on a form

julien rey
on 3/18/14, 8:34 PM 1,119 views

Hi All,

Im' trying to put a button on my form view on the model quitus.quitus. quitus.quitus contains a field order_id (relation many to one on sale.order). The aim is to be able, from a sale order view form, to click the buton and go to the quitus.quitus search view filtered with the sale.order previously opened (like it already exists on partner to see sale order's partner).

Here is my search view concerning quitus.quitus :

<record model="ir.ui.view" id="view_quitus_search">
        <field name="name">view.quitus.search</field> 
        <field name="model">quitus.quitus</field> 
        <field name="type">search</field> 
        <field name="priority" eval="16"/> 
        <field name="arch" type="xml">
            <search string="Search Quitus"> 
                <filter string="My quitus" domain="[('employee_id','=',uid)]" help="My own quitus"/>
                <field name="order_id" select="1"/>
                <field name="approver" select="1"/>
                <filter string="Order" icon="terp-personal" domain="[]" "/>

    <record model="ir.actions.act_window" id="quitus_list"> 
        <field name="name">Quitus</field> 
        <field name="view_quitus_search" ref="view_quitus_search"/> 
        <!--<field name="domain">[list of 3-tuples (max 250 characters)]</field> -->
        <field name="res_model">quitus.quitus</field> 
        <field name="view_type">form</field> 
        <field name="view_mode">tree,form</field>  
        <field name="view_quitus_search" ref="view_quitus_search"/> 

and here is the sale.order form view that i'm trying to update to put a button

<record model="ir.ui.view" id="view_order_form_button_quitus">
        <field name="model">sale.order</field>
        <field name="name">view.inherit.order.form</field>
        <field name="view_type">form</field>
        <field name="inherit_id" ref="sale.view_order_form" />
        <field name="arch" type="xml">
            <notebook position="inside">
                <page string="quitus">
                        <button name="%(quitus_list)d" type="action" string="Quitus" attrs="{'invisible': [('Order', '=', False)]}" />                      

I'm sure i'm missing something about context or domain ... i'm little bit confused...

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: 3/18/14, 8:34 PM
Seen: 1119 times
Last updated: 3/16/15, 8:10 AM