flectra/addons/blanket_so_po/views/purchase_view.xml

52 lines
2.5 KiB
XML
Raw Normal View History

2018-06-20 09:39:59 +02:00
<?xml version="1.0" encoding="utf-8"?>
<flectra>
<record id="inherit_blanket_purchase_order_form_view" model="ir.ui.view">
<field name="name">inherit.purchase.form.view</field>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="priority">1</field>
<field name="arch" type="xml">
<xpath expr="/form/sheet/notebook/page/field[@name='order_line']/form/sheet/group"
position="before">
<header>
<button name="%(action_purchase_transfer_products)d"
type="action" string="Transfer"
class="oe_highlight"
attrs="{'invisible':['|', '|', ('blanket_po_line', '=', False), ('remaining_to_po_transfer','&lt;=',0),('state','!=','purchase')]}"/>
</header>
</xpath>
<xpath expr="/form/sheet/notebook/page/field[@name='order_line']/form/sheet/group/group/div/field[@name='product_uom']"
position="before">
<field name="state" invisible="1"/>
</xpath>
<xpath expr="//field[@name='order_line']/tree"
position="attributes">
<attribute name="editable"/>
</xpath>
<xpath expr="/form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='name']"
position="after">
<field name='blanket_po_line'/>
</xpath>
<xpath expr="/form/sheet/notebook/page/field[@name='order_line']/form/sheet/group/group/field[@name='taxes_id']"
position="before">
<field name='blanket_po_line'
attrs="{'readonly':[('state','=','sale')]}"/>
</xpath>
<xpath expr="/form/sheet/notebook/page/field[@name='order_line']/form/sheet/group/group/field[@name='product_id']"
position="after">
<field name="remaining_to_po_transfer"
attrs="{'invisible':[('state','!=','purchase')]}"
string="Remaining to Transfer"/>
</xpath>
<xpath expr="/form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='qty_received']"
position="after">
<field name="remaining_to_po_transfer"
string="Remaining to Transfer"/>
</xpath>
</field>
</record>
</flectra>