<commit_before><?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright NuoBiT Solutions, S.L. (<https://www.nuobit.com>)
     <NAME> <<EMAIL>>
     License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) -->
<odoo>
    <record id="purchase_order_form" model="ir.ui.view">
        <field name="name">purchase.order.form.inherit.new.line.uom</field>
        <field name="model">purchase.order</field>
        <field name="inherit_id" ref="purchase.purchase_order_form" />
        <field name="arch" type="xml">
            <xpath
                expr="//field[@name='order_line']/tree/field[@name='invoice_lines']"
                position="after"
            >
                <field name="invoice_lines" invisible="1" widget="many2many_tags" />
                <field name="move_ids" invisible="1" widget="many2many_tags" />
            </xpath>
            <xpath
                expr="//field[@name='order_line']/tree/field[@name='product_uom']"
                position="attributes"
            >
                <attribute name="attrs">{'readonly': [
                    '|', '|', ('state', 'in', ('purchase', 'done', 'cancel')),
                    ('invoice_lines', '!=', []), ('move_ids', '!=', [])
                    ], 'required': [('display_type', '=', False)]}
                </attribute>
            </xpath>
        </field>
    </record>
</odoo><commit_msg>FIX: services can be editable on whatever state<commit_after><?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright NuoBiT Solutions, S.L. (<https://www.nuobit.com>)
     <NAME> <<EMAIL>>
     License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) -->
<odoo>
    <record id="purchase_order_form" model="ir.ui.view">
        <field name="name">purchase.order.form.inherit.new.line.uom</field>
        <field name="model">purchase.order</field>
        <field name="inherit_id" ref="purchase.purchase_order_form" />
        <field name="arch" type="xml">
            <xpath
                expr="//field[@name='order_line']/tree/field[@name='invoice_lines']"
                position="after"
            >
                <field name="invoice_lines" invisible="1" widget="many2many_tags" />
                <field name="move_ids" invisible="1" widget="many2many_tags" />
            </xpath>
            <xpath
                expr="//field[@name='order_line']/tree/field[@name='product_uom']"
                position="attributes"
            >
                <attribute name="attrs">{'readonly': [
                    ('state', 'in', ('purchase', 'done', 'cancel')),
                    '|', ('invoice_lines', '!=', []), ('move_ids', '!=', [])
                    ], 'required': [('display_type', '=', False)]}
                </attribute>
            </xpath>
        </field>
    </record>
</odoo>
{'fraction_non_alphanumeric': 0.19511318720804888, 'fraction_numerical': 0.0064678404599353215, 'mean_word_length': 2.1106145251396646, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 2, '>': 53, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4148455', 'n_tokens_mistral': 872, 'n_tokens_neox': 847, 'n_words': 128}