<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2020 ForgeFlow S.L.
     License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
    <record id="view_partner_form" model="ir.ui.view">
        <field name="name">partner.factory.calendar.form</field>
        <field name="model">res.partner</field>
        <field name="inherit_id" ref="base.view_partner_form" />
        <field name="arch" type="xml">
            <xpath
                expr="//page[@name='sales_purchases']//group[@name='purchase']"
                position="inside"
            >
                <field name="delay_calendar_type" />
                <field
                    name='factory_calendar_id'
                    attrs="{'invisible': [('delay_calendar_type', '=', 'natural')]}"
                />
            </xpath>
        </field>
    </record>
</odoo>
