Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
4318 Vistas

I am making a search view in Openerp v7. I want to add the view to sales but I have customized module which added more fields to the sale.order model. The view should display all records of different statuses like draft quotations, sent for sale etc. In the Quotations only those with draft quotations are sent and are not displayed when the sale is confirmed. My search view does not show the sales when they are in draft quotation state.My search view and action is given below

<record model="ir.ui.view" id="view_sale_order_search">
        <field name="name">sale.order.tickets</field>
        <field name="model">sale.order</field>
            <field name="arch" type="xml">
                <search string="Search Sales">
                    <field name="name" string="Sales" filter_domain="[('name','like',self)]"/>
                    <separator/>
                    <filter  string="To Invoice" domain="[('state','=','manual')]" />
                    <filter  string="Done" domain="[('state','=','done')]" help="Sales Order done"/> 
                    <separator/>
                    <filter string="Group by Customer" domain="[]" context="{'group_by':'partner_id'}"/>
                    <filter string="Group by Username" domain="[]" context="{'group_by':'user_id'}"/>
                    <filter string="Group by Status" domain="[]" context="{'group_by':'state'}"/>
                    <filter string="Group by Date"  domain="[]" context="{'group_by':'date_order'}"/>
               </search>
            </field>
        </record>

        <record model="ir.actions.act_window" id="action_sale_order_search">
            <field name="name">action.sale.order.search</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">sale.order</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree</field>
            <field name="search_view_id" ref="view_sale_order_search"/>
        </record>

 

Avatar
Descartar
Autor Mejor respuesta

Do you have a menu using the Window action? The out of the box menus for Quotations and Sales Orders have domains that show ONLY Quotations ( draft Sales Orders - [('state','in',('draft','sent','cancel'))] ) or Sales Orders ( confirmed Quotations - [('state','not in',('draft','sent','cancel'))] ).

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
oct 25
254
1
sept 25
519
2
sept 25
620
3
sept 25
638
3
ago 25
672