Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
4331 Visualizzazioni

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
Abbandona
Autore Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
3
ott 25
384
1
set 25
561
2
set 25
657
3
set 25
680
3
ago 25
708