<commit_before><?xml version="1.0" encoding="utf-8"?>
<odoo>

    <record id="stock_picking_form" model="ir.ui.view">
        <field name="name">l10n_br_stock_account.picking.form</field>
        <field name="model">stock.picking</field>
        <field name="inherit_id" ref="stock_picking_invoicing.view_picking_form"/>
        <field name="priority">99</field>
        <field name="arch" type="xml">
            <field name="picking_type_id" position="after">
                <field name="fiscal_operation_id" attrs="{'required': [('invoice_state', '=', '2binvoiced')], 'readonly': [('invoice_state', '=', 'invoiced')]}"/>
            </field>
            <field name="invoice_state" position="attributes">
                <attribute name="readonly">1</attribute>
                <attribute name="force_save">1</attribute>
            </field>
            <field name="move_ids_without_package" position="attributes">
                <attribute name="context">
                    {'default_invoice_state': invoice_state,
                    'address_in_id': partner_id,
                    'form_view_ref': 'stock.view_move_picking_form',
                    'default_picking_type_id': picking_type_id,
                    'default_picking_id': id,
                    'default_location_id': location_id,
                    'default_location_dest_id': location_dest_id,
                    'default_fiscal_operation_id': fiscal_operation_id,
                    'default_company_id': company_id,
                    'default_partner_id': partner_id,
                    'picking_type_code': picking_type_code}</attribute>
            </field>
            <xpath expr="//field[@name='move_ids_without_package']//tree" position="attributes">
                <attribute name="editable"/>
            </xpath>
            <xpath expr="//field[@name='move_ids_without_package']//tree/field[@name='invoice_state']" position="after">
                <field name="fiscal_operation_id" attrs="{'invisible': [('invoice_state', '=', 'none')], 'required': [('invoice_state', '=', '2binvoiced')], 'readonly': [('invoice_state', '=', 'invoiced')]}"/>
                <field name="fiscal_operation_line_id" attrs="{'invisible': [('invoice_state', '=', 'none')], 'required': [('invoice_state', '=', '2binvoiced')], 'readonly': [('invoice_state', '=', 'invoiced')]}"/>
            </xpath>
            <div name="button_box" position="inside">
                <button name="action_view_document"
                    type="object"
                    class="oe_stat_button"
                    icon="fa-pencil-square-o"
                    attrs="{'invisible': [('invoice_ids', '=', [])]}" groups="base.group_user">
                    <div class="o_form_field o_stat_info">
                        <span class="o_stat_text">Documents</span>
                    </div>
                </button>
            </div>
            <button name="set_to_be_invoiced" position="replace"/>
        </field>
    </record>

    <!--  -->

</odoo><commit_msg>[REF] Put back button set_to_be_invoiced, I don't see the reason to remove it.<commit_after><?xml version="1.0" encoding="utf-8"?>
<odoo>

    <record id="stock_picking_form" model="ir.ui.view">
        <field name="name">l10n_br_stock_account.picking.form</field>
        <field name="model">stock.picking</field>
        <field name="inherit_id" ref="stock_picking_invoicing.view_picking_form"/>
        <field name="priority">99</field>
        <field name="arch" type="xml">
            <field name="picking_type_id" position="after">
                <field name="fiscal_operation_id" attrs="{'required': [('invoice_state', '=', '2binvoiced')], 'readonly': [('invoice_state', '=', 'invoiced')]}"/>
            </field>
            <field name="invoice_state" position="attributes">
                <attribute name="readonly">1</attribute>
                <attribute name="force_save">1</attribute>
            </field>
            <field name="move_ids_without_package" position="attributes">
                <attribute name="context">
                    {'default_invoice_state': invoice_state,
                    'address_in_id': partner_id,
                    'form_view_ref': 'stock.view_move_picking_form',
                    'default_picking_type_id': picking_type_id,
                    'default_picking_id': id,
                    'default_location_id': location_id,
                    'default_location_dest_id': location_dest_id,
                    'default_fiscal_operation_id': fiscal_operation_id,
                    'default_company_id': company_id,
                    'default_partner_id': partner_id,
                    'picking_type_code': picking_type_code}</attribute>
            </field>
            <xpath expr="//field[@name='move_ids_without_package']//tree" position="attributes">
                <attribute name="editable"/>
            </xpath>
            <xpath expr="//field[@name='move_ids_without_package']//tree/field[@name='invoice_state']" position="after">
                <field name="fiscal_operation_id" attrs="{'invisible': [('invoice_state', '=', 'none')], 'required': [('invoice_state', '=', '2binvoiced')], 'readonly': [('invoice_state', '=', 'invoiced')]}"/>
                <field name="fiscal_operation_line_id" attrs="{'invisible': [('invoice_state', '=', 'none')], 'required': [('invoice_state', '=', '2binvoiced')], 'readonly': [('invoice_state', '=', 'invoiced')]}"/>
            </xpath>
            <div name="button_box" position="inside">
                <button name="action_view_document"
                    type="object"
                    class="oe_stat_button"
                    icon="fa-pencil-square-o"
                    attrs="{'invisible': [('invoice_ids', '=', [])]}" groups="base.group_user">
                    <div class="o_form_field o_stat_info">
                        <span class="o_stat_text">Documents</span>
                    </div>
                </button>
            </div>
        </field>
    </record>

</odoo>
{'fraction_non_alphanumeric': 0.1618449330467846, 'fraction_numerical': 0.003967597950074392, 'mean_word_length': 2.3388520971302427, 'pattern_counts': {'":': 0, '<': 89, '<?xml version=': 2, '>': 89, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '1075708', 'n_tokens_mistral': 1827, 'n_tokens_neox': 1769, 'n_words': 256}