Files
odoo_source/addons/purchase/views/procurement_views.xml
T
tdi-odoo dabbc2cb7e [IMP] purchase: add Purchases statbutton in procurement form view
In procurement form view display a Purchases stat button that redirects to
the purchase order. It opens the PO form view. Note that Purchase Order field
in Extra Information is left untouched. It is just a shortcut to ease
usability.
2016-09-27 15:12:53 +02:00

19 lines
909 B
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="procurement_order_view_form_inherit_purchase" model="ir.ui.view">
<field name="name">procurement.order.form.inherit.button</field>
<field name="model">procurement.order</field>
<field name="inherit_id" ref="procurement.procurement_form_view"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='do_view_procurements']" position="before">
<button name="open_purchase_order" string="Purchases" type="object"
class="oe_stat_button" icon="fa-shopping-cart"
context="{'active_id':purchase_id}"
attrs="{'invisible':[('purchase_id', '=', False)]}">
</button>
</xpath>
</field>
</record>
</data>
</odoo>