Odoo Help

0

In Sale Order / Purchase Order the button linking to the Shipment/Picking dissapears once the order is complete

By
Santi
on 7/10/14, 10:54 AM 1,610 views

In OpenERP 7.0 i've noticed that in both the Sale Orders and Purchase Orders the button linking to the Shipment/Picking dissapears once the order is complete (In "Done" state, once the shipment has been sent and the invoice paid), and there is no way to see or open the associated Shipment/Picking from the Sale Orders and Purchase Orders, I have to mannually go to the Warehouse module and search there. I find this very counterproductive. 

Is this the normal behaviour? or a bug? I've even created a new  clean database to see if it was a problem with my production database, but I still run into the same problem...

Something like states="approved,done"

Santi
on 7/11/14, 3:55 AM
1
Richmond Ang
On 7/10/14, 12:52 PM

If you go to /addons/purchase/ there is a file called stock_view.xml and look for the code below in bold.

        <record id="purchase_order_2_stock_picking" model="ir.ui.view">
            <field name="name">Purchase Picking Inherited</field>
            <field name="model">purchase.order</field>
            <field name="inherit_id" ref="purchase.purchase_order_form"/>
            <field name="arch" type="xml">
                 <xpath expr="//div[contains(@class, 'oe_title')]" position="before">
                    <div class="oe_right oe_button_box" name="buttons">
                        <button type="object"
                            name="view_picking"
                            string="Incoming Shipments" states="approved"/>

                        <button type="object"  name="invoice_open"
                            string="Invoices" attrs="{'invisible': [('state', '=', 'draft')]}"/> 
                    </div>
                </xpath>
            </field>
        </record>

You can inherit this view and change the states in which it is shown.

0
Santi
On 7/11/14, 5:51 AM

Just what I was looking for! Thanks Richmond!

For anyone else trying to figure out how to accomplish the same for Sale Orders, you must change the following line in:

model: sale.order

view: sale.order.form

inherit_id: sale_stock.view_order_form_inherit

from: 

<button name="action_view_delivery" string="View Delivery Order" type="object" class="oe_highlight" attrs="{'invisible': ['|','|','|',('picking_ids','=',False),('picking_ids','=',[]), ('state', 'not in', ('progress','manual')),('shipped','=',True)]}" groups="base.group_user"/>

to: 

<button name="action_view_delivery" string="View Delivery Order" type="object" class="oe_highlight" attrs="{'invisible': ['|','|','|',('picking_ids','=',False),('picking_ids','=',[]), ('state', 'not in', ('progress','manual','done'))]}" groups="base.group_user"/>

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.

Register

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

1 follower(s)

Stats

Asked: 7/10/14, 10:54 AM
Seen: 1610 times
Last updated: 10/23/15, 8:36 AM