1. zikzakmedia
  2. trytond-stock_valued

Source

trytond-stock_valued / move.xml

<?xml version="1.0"?>
<!-- This file is part stock_valued module for Tryton.
The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
<tryton>
    <data>
        <record model="ir.ui.view" id="move_view_form">
            <field name="model">stock.move</field>
            <field name="inherit" ref="stock.move_view_form"/>
            <field name="arch" type="xml">
                <![CDATA[
                <data>
                    <xpath
                        expr="/form/field[@name=&quot;unit_price&quot;]"
                        position="replace"/>
                    <xpath
                        expr="/form/label[@name=&quot;unit_price&quot;]"
                        position="replace">
                        <group colspan="4" id="stock_price"
                            states="{'invisible': Not(In(%(stock_valued.group_stock_price)d, Eval('groups', [])))}">
                            <label name="unit_price"/>
                            <field name="unit_price" />
                            <label name="amount"/>
                            <field name="amount" />
                        </group>
                    </xpath>
                </data>
                ]]>
            </field>
        </record>
    </data>
</tryton>