Odoo Help

Welcome!

This community 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.

0

how to make my record not seen in sales order but in quotations, when switching to a status that I add??

By
Michael Marroquin
on 11/6/16, 11:20 PM 106 views

Add the pending status so that it could authorize the sale in sale.order,just that when I click on the button to change the pending status change me of quotation to sales order and buttons disappear confirming order and print.

And my status must be before the sale is confirmed and look at sales order.

How could resolve this?

1

Baiju

--Baiju--
3154
| 5 4 8
Kochi, India
--Baiju--
ODOO technical and functional

        I like learning new thing, especially technical thing. I am a quick learner, I can learn technical things very fast. I have good logical skill,  I have immense interest in programming.

e-mail id : baijuks@hotmail.com

Baiju
On 11/7/16, 12:26 AM

Hi,

     You can control it by adding domain in action of Sale Order. Since there is already action defined for Sale Order and they are already using domain to block draft quotation from Sale Order, we have to use inheritance that to suit our need.

Here is the action defined for sale order:-

<record id="action_orders" model="ir.actions.act_window">
 <field name="name">Sales Orders</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,form,calendar,graph</field>
 <field name="search_view_id" ref="view_sales_order_filter"/>
 <field name="context">{'search_default_my_sale_orders_filter': 1}</field>
 <field name="domain">[('state', 'not in', ('draft', 'sent', 'cancel'))]</field>
 <field name="help" type="html">
 <p class="oe_view_nocontent_create">
            Click to create a quotation that can be converted into a sales order.
</p><p>Odoo will help you efficiently handle the complete sales flow:
quotation, sales order, delivery, invoicing and payment.
</p>
 </field>
 </record>


 modify this line:-

<field name="domain">[('state', 'not in', ('draft', 'sent', 'cancel'))]</field>

Let test be the custom state, we have to add that to domain like this-

<field name="domain">[('state', 'not in', ('draft','test', 'sent', 'cancel'))]</field>


    Now you won't see records in that sate in Sale Order.


Hope this helps.




Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 11/6/16, 11:20 PM
Seen: 106 times
Last updated: 11/7/16, 12:26 AM