<data><!-- ensure string/description matches the model we're looking at the history of -->
            <field name="inventory_datetime" position="attributes">
                <attribute name="invisible">
                    context.get('active_model') != 'product.product'
                </attribute>
            </field>
            <field name="inventory_datetime" position="after">
                <field name="inventory_datetime" string="Valuation at Date" help="Choose a date to get the valuation at that date" invisible="context.get('active_model') != 'stock.valuation.layer'"/>
            </field>
        </data>