İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
4313 Görünümler

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
Vazgeç
Üretici En İyi Yanıt

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Eki 25
221
1
Eyl 25
514
2
Eyl 25
618
3
Eyl 25
634
3
Ağu 25
671