Odoo Help


How to make a Purchase quotation in state "sent" visible in the list (tree view mode)? [Closed]

Anabela Damas
on 3/18/13, 11:02 AM 1,351 views

The Question has been closed

Anabela Damas
on 04/19/2013 14:59:07

Hi, In Purchase module in Purchase>Quotations I've notice that when a Purchase quotation is in the state of RFQ Sent, the Purchase Quotation doesn't appear in the list of quotations neither in Purchase>Purchase Orders.

I went to the code in purchase_view.xml

<record id="purchase_rfq" model="ir.actions.act_window">
    <field name="name">Quotations</field>
    <field name="type">ir.actions.act_window</field>
    <field name="res_model">purchase.order</field>
    <field name="context">{'search_default_draft': 1, 'search_default_to_approve': 1}</field>
    <field name="domain">[('state','in',('draft','sent','confirmed'))]</field>
    <field name="view_mode">tree,form,graph,calendar</field>

and the code is there, the domain is to show a Purchase Quotation in state equal to sent...

What can I do to see in the list of Quotations all the quotations with the state equal to draft and sent?

Ray Carnes
On 3/18/13, 10:19 PM

The CONTEXT is additionally pre-filtering what is shown in the list by default.

The XML file you have posted is the definition of the Window Action that is used when you follow the menu sequence:

Purchases -> Purchase -> Quotations

Ths context of:

{'search_default_draft': 1, 'search_default_to_approve': 1}

. . . is pre-filtering the list to show only those Purchase Orders in DRAFT state (these are Quotations), or those in TO APPROVE state (Waiting Approval).

You can also tell this when you look at the search box:

image description

. . . It shows the two filters applied.

Click the X in the circle at the right hand side of the search box to see the DRAFT, SENT and TO APPROVE Purchase Quotations in the list.

And by code how do I do to allways show the states draft and sent just by going to Purchases->Purchase->Quotations?

Versão Integral, Anabela Damas
on 3/19/13, 7:28 AM

Create a module that (1) overrides the search view and adds a filter to locate 'sent' quotes (2) updates the action and changes the context by using XML such as: <record id="purchase_rfq" model="ir.actions.act_window"> <field name="context">{{'search_default_draft': 1, 'search_default_sent': 1}}</field> </record>

Bista Solutions US, Ray Carnes
on 3/28/13, 5:50 PM

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

0 follower(s)


Asked: 3/18/13, 11:02 AM
Seen: 1351 times
Last updated: 3/16/15, 8:10 AM