questa view è di odoo 18 ed io la dovrei adattare alla versione 17:
<?xml version="1.0" encoding="utf-8" ?>
<!--
  ~ Copyright 2022 Simone Rubino - TAKOBI
  ~ Copyright 2023 Simone Rubino - Aion Tech
  ~ License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
  -->
<odoo>
    <record model="ir.ui.view" id="invoice_supplier_boe_form">
        <field name="name">invoice.supplier.boe.form</field>
        <field name="model">account.move</field>
        <field name="inherit_id" ref="account.view_move_form" />
        <field name="arch" type="xml">
            <div name="button_box" position="inside">
                <button
                    name="action_view_bill_of_entries"
                    type="object"
                    class="oe_stat_button"
                    icon="fa-pencil-square-o"
                    invisible="move_type != 'in_invoice' or bill_of_entries_count == 0"
                >
                    <field
                        name="bill_of_entries_count"
                        widget="statinfo"
                        string="Bill of entries"
                    />
                </button>
                <button
                    name="action_view_extra_supplier_invoices"
                    type="object"
                    class="oe_stat_button"
                    icon="fa-pencil-square-o"
                    invisible="move_type != 'in_invoice' or extra_supplier_invoices_count == 0"
                >
                    <field
                        name="extra_supplier_invoices_count"
                        widget="statinfo"
                        string="Extra invoices"
                    />
                </button>
                <button
                    name="action_view_forwarder_bill_of_entries"
                    type="object"
                    class="oe_stat_button"
                    icon="fa-pencil-square-o"
                    invisible="move_type != 'in_invoice' or forwarder_bill_of_entries_count == 0"
                >
                    <field
                        name="forwarder_bill_of_entries_count"
                        widget="statinfo"
                        string="Bill of entries"
                    />
                </button>
            </div>
            <xpath expr="//button[@name='button_draft']" position="after">
                <button
                    name="generate_bill_of_entry"
                    class="oe_highlight"
                    invisible="move_type != 'in_invoice' or customs_doc_type != 'supplier_invoice' or bill_of_entries_count != 0"
                    string="Generate bill of entry"
                    type="object"
                    groups="account.group_account_invoice"
                />
            </xpath>
            <group id="header_right_group" position="inside">
                <field
                    name="customs_doc_type"
                    invisible="move_type != 'in_invoice'"
                    readonly="state != 'draft' or forwarder_bill_of_entries_count != 0"
                />
            </group>
            <xpath expr="//notebook/page[2]" position="after">
                <page
                    string="Customs"
                    name="customs"
                    invisible="move_type != 'in_invoice' or customs_doc_type not in ('bill_of_entry', 'forwarder_invoice')"
                >
                    <separator
                        string="Supplier invoices"
                        name="supplier_invoices"
                        colspan="4"
                        invisible="customs_doc_type != 'bill_of_entry'"
                    />
                    <field
                        name="supplier_invoice_ids"
                        invisible="customs_doc_type != 'bill_of_entry'"
                        domain="[('customs_doc_type', '=', 'supplier_invoice')]"
                        context="{'default_customs_doc_type': 'supplier_invoice'}"
                    />
                    <group name="forwarder_invoice">
                        <field
                            name="forwarder_invoice_id"
                            invisible="customs_doc_type != 'bill_of_entry'"
                            domain="[('customs_doc_type','=', 'forwarder_invoice'), ('state', '=', 'draft')]"
                            context="{'default_customs_doc_type': 'forwarder_invoice'}"
                        />
                    </group>
                    <group name="storno">
                        <field
                            name="bill_of_entry_storno_id"
                            invisible="customs_doc_type != 'forwarder_invoice'"
                        />
                    </group>
                </page>
            </xpath>
            <xpath
                expr="//notebook/page[1]/field[@name='invoice_line_ids']/list/field[@name='price_subtotal']"
                position="after"
            >
                <field
                    name="advance_customs_vat"
                    column_invisible="parent.move_type != 'in_invoice' or parent.customs_doc_type != 'forwarder_invoice'"
                />
            </xpath>
        </field>
    </record>

    <menuitem
        id="customs"
        name="Customs"
        sequence="99"
        parent="account.menu_finance_payables"
    />

    <record id="action_supplier_invoice" model="ir.actions.act_window">
        <field name="name">Supplier invoices</field>
        <field name="res_model">account.move</field>
        <field name="view_mode">list,kanban,form,pivot,graph,activity</field>
        <field
            name="domain"
        >[('move_type','=','in_invoice'), ('customs_doc_type', '=', 'supplier_invoice')]</field>
        <field
            name="context"
        >{'default_move_type': 'in_invoice', 'journal_type': 'purchase', 'default_customs_doc_type': 'supplier_invoice'}</field>
    </record>
    <record id="action_supplier_invoice_view1" model="ir.actions.act_window.view">
        <field eval="1" name="sequence" />
        <field name="view_mode">list</field>
        <field name="view_id" ref="account.view_move_tree" />
        <field name="act_window_id" ref="action_supplier_invoice" />
    </record>
    <record id="action_supplier_invoice_view2" model="ir.actions.act_window.view">
        <field eval="2" name="sequence" />
        <field name="view_mode">form</field>
        <field name="view_id" ref="account.view_move_form" />
        <field name="act_window_id" ref="action_supplier_invoice" />
    </record>
    <menuitem
        action="action_supplier_invoice"
        id="menu_action_supplier_invoice"
        parent="customs"
    />

    <record id="action_bill_of_entry" model="ir.actions.act_window">
        <field name="name">Bills of entry</field>
        <field name="res_model">account.move</field>
        <field name="view_mode">list,kanban,form,pivot,graph,activity</field>
        <field
            name="domain"
        >[('move_type','=','in_invoice'), ('customs_doc_type', '=', 'bill_of_entry')]</field>
        <field
            name="context"
        >{'default_move_type': 'in_invoice', 'journal_type': 'purchase', 'default_customs_doc_type': 'bill_of_entry'}</field>
    </record>
    <record id="action_bill_of_entry_view1" model="ir.actions.act_window.view">
        <field eval="1" name="sequence" />
        <field name="view_mode">list</field>
        <field name="view_id" ref="account.view_move_tree" />
        <field name="act_window_id" ref="action_bill_of_entry" />
    </record>
    <record id="action_bill_of_entry_view2" model="ir.actions.act_window.view">
        <field eval="2" name="sequence" />
        <field name="view_mode">form</field>
        <field name="view_id" ref="account.view_move_form" />
        <field name="act_window_id" ref="action_bill_of_entry" />
    </record>
    <menuitem
        action="action_bill_of_entry"
        id="menu_action_bill_of_entry"
        parent="customs"
    />

    <record id="action_forwarder_invoice" model="ir.actions.act_window">
        <field name="name">Forwarder invoices</field>
        <field name="res_model">account.move</field>
        <field name="view_mode">list,kanban,form,pivot,graph,activity</field>
        <field
            name="domain"
        >[('move_type','=','in_invoice'), ('customs_doc_type', '=', 'forwarder_invoice')]</field>
        <field
            name="context"
        >{'default_move_type': 'in_invoice', 'journal_type': 'purchase', 'default_customs_doc_type': 'forwarder_invoice'}</field>
    </record>
    <record id="action_forwarder_invoice_view1" model="ir.actions.act_window.view">
        <field eval="1" name="sequence" />
        <field name="view_mode">list</field>
        <field name="view_id" ref="account.view_move_tree" />
        <field name="act_window_id" ref="action_forwarder_invoice" />
    </record>
    <record id="action_forwarder_invoice_view2" model="ir.actions.act_window.view">
        <field eval="2" name="sequence" />
        <field name="view_mode">form</field>
        <field name="view_id" ref="account.view_move_form" />
        <field name="act_window_id" ref="action_forwarder_invoice" />
    </record>
    <menuitem
        action="action_forwarder_invoice"
        id="menu_action_forwarder_invoice"
        parent="customs"
    />
</odoo>

da questo errore:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1765, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 133, in retrying
    result = func()
             ^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1792, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1996, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 222, in _dispatch
    result = endpoint(**request.params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 722, in route_wrapper
    result = endpoint(self, *args, **params_ok)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/dataset.py", line 28, in call_button
    action = self._call_kw(model, method, args, kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/dataset.py", line 20, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 468, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 453, in _call_kw_multi
    result = method(recs, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 75, in check_and_log
    return method(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 466, in button_immediate_install
    return self._button_immediate_function(self.env.registry[self._name].button_install)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 590, in _button_immediate_function
    registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/tools/func.py", line 87, in locked
    return func(inst, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 113, in new
    odoo.modules.load_modules(registry, force_demo, status, update_module)
  File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 480, in load_modules
    processed_modules += load_marked_modules(env, graph,
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 364, in load_marked_modules
    loaded, processed = load_module_graph(
                        ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 227, in load_module_graph
    load_data(env, idref, mode, kind='data', package=package)
  File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 71, in load_data
    tools.convert_file(env, package.name, filename, idref, mode, noupdate, kind)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 627, in convert_file
    convert_xml_import(env, module, fp, idref, mode, noupdate)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 693, in convert_xml_import
    obj.parse(doc.getroot())
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 613, in parse
    self._tag_root(de)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 567, in _tag_root
    raise ParseError(msg) from None  # Restart with "--log-handler odoo.tools.convert:DEBUG" for complete traceback
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
odoo.tools.convert.ParseError: while parsing /opt/odoo/custom_addons/l10n_it_bill_of_entry/views/account_invoice_view.xml:8
Errore nella convalida della vista:

L'elemento '<xpath expr="//notebook/page[1]/field[@name=&#39;invoice_line_ids&#39;]/list/field[@name=&#39;price_subtotal&#39;]">' non può esser localizzato nella vista genitore

View error context:
{'file': '/opt/odoo/custom_addons/l10n_it_bill_of_entry/views/account_invoice_view.xml',
 'line': 31,
 'name': 'invoice.supplier.boe.form',
 'view': ir.ui.view(3025,),
 'view.model': 'account.move',
 'view.parent': ir.ui.view(698,),
 'xmlid': 'invoice_supplier_boe_form'}


The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
    at makeErrorFromResponse (http://34.116.160.142/web/assets/17b5d9d/web.assets_web.min.js:2879:163)
    at XMLHttpRequest.<anonymous> (http://34.116.160.142/web/assets/17b5d9d/web.assets_web.min.js:2883:13)

la view principale di account è questa
<form string="Account Entry" js_class="account_move_form">
                    <header>
                        <!-- Post -->
                        <button name="action_post" string="Post" class="oe_highlight" type="object" groups="account.group_account_invoice" data-hotkey="q" context="{'validate_analytic': True}" invisible="hide_post_button or move_type != 'entry'"/>
                        <button name="action_post" string="Confirm" class="oe_highlight" type="object" groups="account.group_account_invoice" data-hotkey="q" context="{'validate_analytic': True}" invisible="hide_post_button or move_type == 'entry' or display_inactive_currency_warning"/>
                        <!-- Send (only invoices) -->
                        <button name="action_invoice_sent" type="object" string="Send &amp; Print" invisible="state != 'posted' or is_being_sent or invoice_pdf_report_id or move_type not in ('out_invoice', 'out_refund')" class="oe_highlight" data-hotkey="y"/>
                        <button name="action_invoice_sent" type="object" string="Send &amp; Print" invisible="state != 'posted' or not is_being_sent and not invoice_pdf_report_id or move_type not in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund')" data-hotkey="y"/>
                        <!-- Register Payment (only invoices / receipts) -->
                        <button name="action_register_payment" id="account_invoice_payment_btn" type="object" class="oe_highlight" invisible="state != 'posted' or payment_state not in ('not_paid', 'partial') or move_type not in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt')" context="{'dont_redirect_to_payments': True, 'display_account_trust': True}" string="Register Payment" data-hotkey="g" groups="account.group_account_invoice"/>
                        <!-- Preview (only customer invoices) -->
                        <button name="preview_invoice" type="object" string="Preview" data-hotkey="o" title="Preview invoice" invisible="move_type not in ('out_invoice', 'out_refund')"/>
                        <!-- Reverse -->
                        <button name="245" string="Reverse Entry" type="action" groups="account.group_account_invoice" data-hotkey="z" invisible="move_type != 'entry' or state != 'posted' or payment_state == 'reversed'"/>
                        <button name="action_reverse" string="Credit Note" type="object" groups="account.group_account_invoice" invisible="move_type not in ('out_invoice', 'in_invoice') or state != 'posted'"/>
                        <!-- Cancel -->
                        <button name="button_cancel" string="Cancel Entry" type="object" groups="account.group_account_invoice" data-hotkey="x" invisible="not id or state != 'draft' or move_type != 'entry'"/>
                        <button name="button_cancel" string="Cancel" type="object" groups="account.group_account_invoice" data-hotkey="x" invisible="not id or state != 'draft' or move_type == 'entry'"/>
                        <button name="button_draft" string="Reset to Draft" type="object" groups="account.group_account_invoice" invisible="not show_reset_to_draft_button" data-hotkey="r"/>
                        <button string="Request Cancel" name="button_request_cancel" type="object" groups="account.group_account_invoice" invisible="state != 'posted' or show_reset_to_draft_button or not need_cancel_request" data-hotkey="w"/>

                        <!-- Set as Checked -->
                        <button name="button_set_checked" string="Set as Checked" type="object" groups="account.group_account_invoice" invisible="not to_check" data-hotkey="k"/>
                        <field name="state" widget="statusbar" statusbar_visible="draft,posted"/>
                    </header>
                    <div class="alert alert-warning" role="alert" invisible="state != 'draft' or not duplicated_ref_ids">
                        Warning: this bill might be a duplicate of
                        <button name="open_duplicated_ref_bill_view" type="object" string="one of those bills" class="btn btn-link p-0"/>
                    </div>
                    <div class="alert alert-info" role="alert" invisible="not is_being_sent">
                        This invoice is being sent in the background.
                    </div>
                    <!-- Invoice outstanding credits -->
                    <div groups="account.group_account_invoice,account.group_account_readonly" class="alert alert-warning" role="alert" invisible="state != 'draft' or not tax_lock_date_message">
                        <field name="tax_lock_date_message" nolabel="1"/>
                    </div>
                    <div groups="account.group_account_invoice,account.group_account_readonly" class="alert alert-info" role="alert" invisible="move_type not in ('out_invoice', 'out_receipt') or not invoice_has_outstanding or payment_state not in ('not_paid', 'partial')">
                        You have <bold><a class="alert-link" href="#outstanding" role="button">outstanding credits</a></bold> for this customer. You can allocate them to mark this invoice as paid.
                    </div>
                    <div groups="account.group_account_invoice,account.group_account_readonly" class="alert alert-info" role="alert" invisible="move_type not in ('in_invoice', 'in_receipt') or not invoice_has_outstanding or payment_state not in ('not_paid', 'partial')">
                        You have <bold><a class="alert-link" href="#outstanding" role="button">outstanding debits</a></bold> for this vendor. You can allocate them to mark this bill as paid.
                    </div>
                    <div groups="account.group_account_invoice,account.group_account_readonly" class="alert alert-info" role="alert" invisible="move_type != 'out_refund' or not invoice_has_outstanding or payment_state not in ('not_paid', 'partial')">
                        You have <bold><a class="alert-link" href="#outstanding" role="button">outstanding debits</a></bold> for this customer. You can allocate them to mark this credit note as paid.
                    </div>
                    <div groups="account.group_account_invoice,account.group_account_readonly" class="alert alert-info" role="alert" invisible="move_type != 'in_refund' or not invoice_has_outstanding or payment_state not in ('not_paid', 'partial')">
                        You have <bold><a class="alert-link" href="#outstanding" role="button">outstanding credits</a></bold> for this vendor. You can allocate them to mark this credit note as paid.
                    </div>
                    <div class="alert alert-info" role="alert" invisible="state != 'draft' or auto_post != 'at_date'">
                        This move is configured to be posted automatically at the accounting date: <field name="date" readonly="1"/>.
                    </div>
                    <div class="alert alert-info" role="alert" invisible="state != 'draft' or auto_post == 'no' or auto_post == 'at_date'">
                         <field name="auto_post" readonly="1"/> auto-posting enabled. Next accounting date: <field name="date" readonly="1"/>.<span invisible="not auto_post_until"> The recurrence will end on <field name="auto_post_until" readonly="1"/> (included).</span>
                    </div>
                    <div groups="account.group_account_invoice,account.group_account_readonly" class="alert alert-warning" role="alert" invisible="partner_credit_warning == ''">
                        <field name="partner_credit_warning"/>
                    </div>
                    <!-- Currency consistency -->
                    <div class="alert alert-warning" role="alert" invisible="not display_inactive_currency_warning or move_type not in ('in_invoice', 'in_refund', 'in_receipt')">
                        In order to validate this bill, you must <button class="oe_link" type="object" name="action_activate_currency" style="padding: 0; vertical-align: baseline;">activate the currency of the bill</button>. The journal entries need to be computed by Odoo before being posted in your company's currency.
                    </div>
                    <div class="alert alert-warning" role="alert" invisible="not display_inactive_currency_warning or move_type not in ('out_invoice', 'out_refund', 'out_receipt')">
                        In order to validate this invoice, you must <button class="oe_link" type="object" name="action_activate_currency" style="padding: 0; vertical-align: baseline;">activate the currency of the invoice</button>. The journal entries need to be computed by Odoo before being posted in your company's currency.
                    </div>
                    <sheet>
                        <div name="button_box" class="oe_button_box">
                            <button name="action_open_business_doc" class="oe_stat_button" icon="fa-bars" type="object" invisible="move_type != 'entry' or not id or not payment_id">
                                    <div class="o_stat_info">
                                        <span class="o_stat_text">1 Payment</span>
                                    </div>
                            </button>
                            <button name="open_reconcile_view" class="oe_stat_button" icon="fa-bars" type="object" invisible="move_type != 'entry' or not id or not has_reconciled_entries">
                                    <div class="o_stat_info">
                                        <span class="o_stat_text">Reconciled Items</span>
                                    </div>
                            </button>
                            <button name="open_created_caba_entries" class="oe_stat_button" icon="fa-usd" type="object" invisible="not tax_cash_basis_created_move_ids">
                                    <div class="o_stat_info">
                                        <span class="o_stat_text">Cash Basis Entries</span>
                                    </div>
                            </button>
                        </div>

                        <!-- Payment status for invoices / receipts -->
                        <widget name="web_ribbon" title="Paid" invisible="payment_state != 'paid' or move_type not in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt')"/>
                        <widget name="web_ribbon" title="In Payment" invisible="payment_state != 'in_payment' or move_type not in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt')"/>
                        <widget name="web_ribbon" title="Partial" invisible="payment_state != 'partial' or move_type not in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt')"/>
                        <widget name="web_ribbon" title="Reversed" bg_color="text-bg-danger" invisible="payment_state != 'reversed'"/>
                         <widget name="web_ribbon" text="Invoicing App Legacy" bg_color="text-bg-info" invisible="payment_state != 'invoicing_legacy'" tooltip="This entry has been generated through the Invoicing app, before installing Accounting. It has been disabled by the 'Invoicing Switch Threshold Date' setting so that it does not impact your accounting."/>

                        <!-- Invisible fields -->
                        <field name="id" invisible="1"/>
                        <field name="state" invisible="1"/>
                        <field name="company_id" invisible="1"/>
                        <field name="journal_id" invisible="1"/>
                        <field name="show_name_warning" invisible="1"/>
                        <field name="posted_before" invisible="1"/>
                        <!--test-tags .test_01_account_tour -->
                        <field name="move_type" invisible="1" force_save="1"/>
                        <field name="payment_state" invisible="1" force_save="1"/>
                        <field name="invoice_filter_type_domain" invisible="1"/>
                        <field name="suitable_journal_ids" invisible="1"/>
                        <field name="currency_id" invisible="1" readonly="state in ['cancel', 'posted']"/>
                        <field name="company_currency_id" invisible="1"/>
                        <field name="commercial_partner_id" invisible="1"/>
                        <field name="bank_partner_id" invisible="1"/>
                        <field name="display_qr_code" invisible="1"/>
                        <field name="show_reset_to_draft_button" invisible="1"/>

                        <field name="invoice_has_outstanding" invisible="1"/>
                        <field name="is_move_sent" invisible="1"/>
                        <field name="invoice_pdf_report_id" invisible="1"/>
                        <field name="need_cancel_request" invisible="1"/>
                        <field name="has_reconciled_entries" invisible="1"/>
                        <field name="restrict_mode_hash_table" invisible="1"/>
                        <field name="inalterable_hash" invisible="1"/>
                        <field name="country_code" invisible="1"/>
                        <field name="display_inactive_currency_warning" invisible="1"/>
                        <field name="statement_line_id" invisible="1"/>
                        <field name="statement_id" invisible="1"/>
                        <field name="payment_id" invisible="1"/>
                        <field name="tax_country_id" invisible="1"/>
                        <field name="tax_calculation_rounding_method" invisible="1"/>
                        <field name="tax_cash_basis_created_move_ids" invisible="1"/>
                        <field name="quick_edit_mode" invisible="1"/>
                        <field name="hide_post_button" invisible="1"/>
                        <field name="duplicated_ref_ids" invisible="1"/>
                        <field name="quick_encoding_vals" invisible="1"/>
                        <field name="show_delivery_date" invisible="1"/>
                        <field name="is_being_sent" invisible="1"/>

                        <div class="oe_title">
                            <span class="o_form_label"><field name="move_type" readonly="1" invisible="move_type == 'entry'" nolabel="1"/></span>

                            <div class="text-warning" invisible="not show_name_warning">The current highest number is <field class="oe_inline" name="highest_name"/>. You might want to put a higher number here.</div>

                            <h1>
                                <field name="name" invisible="name == '/' and not posted_before and not quick_edit_mode" readonly="state != 'draft'" placeholder="Draft"/>

                                <span invisible="state != 'draft' or name != '/' or posted_before or quick_edit_mode">Draft</span>
                            </h1>
                        </div>
                        <group>
                            <group id="header_left_group">

                                <label for="partner_id" string="Customer" style="font-weight:bold;" invisible="move_type not in ('out_invoice', 'out_refund', 'out_receipt')"/>
                                <label for="partner_id" string="Vendor" style="font-weight:bold;" invisible="move_type not in ('in_invoice', 'in_refund', 'in_receipt')"/>
                                <field name="partner_id" widget="res_partner_many2one" nolabel="1" context="{                                             'res_partner_search_mode': (context.get('default_move_type', 'entry') in ('out_invoice', 'out_refund', 'out_receipt') and 'customer') or (context.get('default_move_type', 'entry') in ('in_invoice', 'in_refund', 'in_receipt') and 'supplier') or False,                                             'show_address': 1, 'default_is_company': True, 'show_vat': True}" domain="[('company_id', 'in', (False, company_id))]" options="{&quot;no_quick_create&quot;: True}" invisible="move_type not in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt')" readonly="state != 'draft'"/>

                                <field name="partner_shipping_id" groups="account.group_delivery_invoice_address" invisible="move_type not in ('out_invoice', 'out_refund', 'out_receipt')" readonly="state != 'draft'"/>
                                <field name="quick_edit_total_amount" class="w-50" invisible="move_type == 'entry' or not quick_edit_mode" readonly="state != 'draft'"/>
                                <label for="ref" string="Bill Reference" invisible="move_type not in ('in_invoice', 'in_receipt', 'in_refund')"/>
                                <field name="ref" nolabel="1" invisible="move_type not in ('in_invoice', 'in_receipt', 'in_refund')"/>
                                <field name="ref" invisible="move_type in ('in_invoice', 'in_receipt', 'in_refund', 'out_invoice', 'out_refund')"/>
                                <field name="tax_cash_basis_origin_move_id" invisible="not tax_cash_basis_origin_move_id"/>
                                <label name="invoice_vendor_bill_id_label" for="invoice_vendor_bill_id" string="Auto-Complete" class="oe_edit_only" invisible="state != 'draft' or move_type != 'in_invoice'"/>
                                <field name="invoice_vendor_bill_id" nolabel="1" class="oe_edit_only" invisible="state != 'draft' or move_type != 'in_invoice'" domain="[('company_id', '=', company_id), ('partner_id','child_of', [partner_id]), ('move_type','=','in_invoice')]" placeholder="Select an old vendor bill" options="{'no_create': True}" context="{'show_total_amount': True}"/>
                            </group>
                            <group id="header_right_group">

                                <!-- Invoice date (only invoices / receipts) -->
                                <label for="invoice_date" string="Invoice Date" style="font-weight:bold;" invisible="move_type not in ('out_invoice', 'out_refund', 'out_receipt')"/>
                                <label for="invoice_date" string="Bill Date" style="font-weight:bold;" invisible="move_type not in ('in_invoice', 'in_refund', 'in_receipt')"/>
                                <field name="invoice_date" nolabel="1" options="{'warn_future': true}" invisible="move_type not in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt')" readonly="state != 'draft'"/>

                                <field name="date" string="Accounting Date" invisible="move_type in ('out_invoice', 'out_refund', 'out_receipt') and not quick_edit_mode and not (state == 'posted' and date != invoice_date)" readonly="state != 'draft'"/>
                                <field name="payment_reference" invisible="move_type not in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt')" readonly="inalterable_hash != False"/>
                                <field name="partner_bank_id" context="{'default_partner_id': bank_partner_id, 'display_account_trust': True}" domain="[('partner_id', '=', bank_partner_id)]" invisible="move_type not in ('in_invoice', 'in_refund', 'in_receipt')" readonly="state != 'draft'"/>

                                <!-- Invoice payment terms (only invoices) + due date (only invoices / receipts) -->
                                <div class="o_td_label" invisible="move_type not in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt')">
                                    <label for="invoice_date_due" string="Due Date" invisible="invoice_payment_term_id"/>
                                    <label for="invoice_payment_term_id" string="Payment terms" invisible="not invoice_payment_term_id"/>
                                </div>
                                <div class="d-flex" invisible="move_type not in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt')" name="due_date">
                                    <field name="invoice_date_due" force_save="1" placeholder="Date" invisible="invoice_payment_term_id"/>
                                    <span class="o_form_label mx-3 oe_edit_only" invisible="state != 'draft' or invoice_payment_term_id"> or </span>
                                    <field name="invoice_payment_term_id" context="{'example_date': invoice_date, 'example_amount': tax_totals['amount_total']}" placeholder="Payment Terms" options="{'no_quick_create':True}" readonly="state in ['cancel', 'posted']"/>
                                </div>
                                <field name="delivery_date" invisible="not show_delivery_date" readonly="state != 'draft'"/>
                                <label for="journal_id" groups="account.group_account_readonly" invisible="context.get('default_journal_id') and context.get('move_type', 'entry') != 'entry'"/>
                                <div name="journal_div" class="d-flex" groups="account.group_account_readonly" invisible="context.get('default_journal_id') and context.get('move_type', 'entry') != 'entry'">
                                    <field name="journal_id" options="{'no_create': True, 'no_open': True}" readonly="posted_before"/>
                                    <span class="oe_inline o_form_label mx-3" groups="base.group_multi_currency" invisible="move_type == 'entry'"> in </span>
                                    <field name="currency_id" groups="base.group_multi_currency" invisible="move_type == 'entry'" readonly="state != 'draft'" options="{'no_create': True}" context="{'search_default_active': 1, 'search_default_inactive': 1}"/>
                                </div>

                                <field name="currency_id" readonly="state != 'draft'" groups="!account.group_account_readonly,base.group_multi_currency" options="{'no_create': True}"/>

                            </group>
                        </group>
                        <notebook>
                            <page id="invoice_tab" name="invoice_tab" string="Invoice Lines" invisible="move_type == 'entry'">
                                <field name="invoice_line_ids" widget="section_and_note_one2many" mode="tree,kanban" context="{                                            'default_move_type': context.get('default_move_type'),                                            'journal_id': journal_id,                                            'default_partner_id': commercial_partner_id,                                            'default_currency_id': currency_id or company_currency_id,                                            'default_display_type': 'product',                                            'quick_encoding_vals': quick_encoding_vals,                                        }" readonly="state != 'draft'">
                                    <tree editable="bottom" string="Journal Items" default_order="sequence, id">
                                        <control>
                                            <create name="add_line_control" string="Add a line"/>
                                            <create name="add_section_control" string="Add a section" context="{'default_display_type': 'line_section'}"/>
                                            <create name="add_note_control" string="Add a note" context="{'default_display_type': 'line_note'}"/>
                                        </control>

                                        <!-- Displayed fields -->
                                        <field name="sequence" widget="handle"/>
                                        <field name="product_id" optional="show" widget="many2one_barcode" domain="                                                     context.get('default_move_type') in ('out_invoice', 'out_refund', 'out_receipt')                                                     and [('sale_ok', '=', True)]                                                     or [('purchase_ok', '=', True)]                                                "/>
                                        <field name="name" widget="section_and_note_text" optional="show"/>
                                        <field name="account_id" context="{'partner_id': partner_id, 'move_type': parent.move_type}" groups="account.group_account_readonly" options="{'no_quick_create': True}" domain="[('deprecated', '=', False), ('account_type', 'not in', ('asset_receivable', 'liability_payable', 'off_balance')), ('company_id', 'parent_of', parent.company_id)]" required="display_type not in ('line_note', 'line_section')"/>
                                        <field name="analytic_distribution" widget="analytic_distribution" groups="analytic.group_analytic_accounting" optional="show" options="{'product_field': 'product_id', 'account_field': 'account_id', 'amount_field': 'price_subtotal'}" business_domain_compute="parent.move_type in ['out_invoice', 'out_refund', 'out_receipt'] and 'invoice' or parent.move_type in ['in_invoice', 'in_refund', 'in_receipt'] and 'bill' or 'general'"/>
                                        <field name="quantity" optional="show"/>
                                        <field name="product_uom_category_id" column_invisible="True"/>
                                        <field name="product_uom_id" string="UoM" groups="uom.group_uom" optional="show"/>
                                        <!-- /l10n_in_edi.test_edi_json -->
                                        <!-- required for @api.onchange('product_id') -->
                                        <field name="product_uom_id" column_invisible="True"/>
                                        <field name="price_unit" string="Price"/>
                                        <field name="discount" string="Disc.%" optional="hide"/>
                                        <field name="tax_ids" widget="many2many_tags" domain="[('type_tax_use', '=?', parent.invoice_filter_type_domain), ('company_id', 'parent_of', parent.company_id), ('country_id', '=', parent.tax_country_id)]" context="{'append_type_to_tax_name': not parent.invoice_filter_type_domain, 'active_test': True}" options="{'no_create': True}" optional="show"/>
                                        <field name="price_subtotal" string="Tax excl."/>
                                        <field name="price_total" string="Tax incl." column_invisible="parent.tax_calculation_rounding_method == 'round_globally'" optional="hide"/>

                                        <!-- Others fields -->
                                        <field name="partner_id" column_invisible="True"/>
                                        <field name="currency_id" column_invisible="True"/>
                                        <field name="company_id" column_invisible="True"/>
                                        <field name="company_currency_id" column_invisible="True"/>
                                        <field name="display_type" force_save="1" column_invisible="True"/>
                                    </tree>
                                    <kanban class="o_kanban_mobile">
                                        <!-- Displayed fields -->
                                        <field name="name"/>
                                        <field name="product_id"/>
                                        <field name="price_subtotal" string="Tax excl."/>
                                        <field name="price_total" string="Tax incl." optional="hide"/>
                                        <field name="quantity"/>
                                        <field name="product_uom_category_id"/>
                                        <field name="product_uom_id" groups="uom.group_uom"/>
                                        <field name="price_unit"/>
                                        <templates>
                                            <t t-name="kanban-box">
                                                <div t-attf-class="oe_kanban_card oe_kanban_global_click ps-0 pe-0 {{ record.display_type.raw_value ? 'o_is_' + record.display_type.raw_value : '' }}">
                                                    <t t-if="!['line_note', 'line_section'].includes(record.display_type.raw_value)">
                                                        <div class="row g-0">
                                                            <div class="col-2 pe-3">
                                                                <img t-att-src="kanban_image('product.product', 'image_128', record.product_id.raw_value)" t-att-title="record.product_id.value" t-att-alt="record.product_id.value" style="max-width: 100%;"/>
                                                            </div>
                                                            <div class="col-10">
                                                                <div class="row">
                                                                    <div class="col">
                                                                        <strong t-out="record.product_id.value"/>
                                                                    </div>
                                                                    <div class="col-auto">
                                                                        <strong class="float-end text-end">
                                                                            <t t-out="record.price_subtotal.value"/>
                                                                            <t t-out="record.price_total.value" t-if="tax_calculation_rounding_method == 'round_per_line'"/>
                                                                        </strong>
                                                                    </div>
                                                                </div>
                                                                <div class="text-muted">
                                                                    Quantity:
                                                                    <t t-out="record.quantity.value"/>
                                                                    <t t-out="record.product_uom_id.value" groups="uom.group_uom"/>
                                                                </div>
                                                                <div class="text-muted">
                                                                    Unit Price:
                                                                    <t t-out="record.price_unit.value"/>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </t>
                                                    <t t-if="record.display_type.raw_value === 'line_section' || record.display_type.raw_value === 'line_note'">
                                                        <div class="row">
                                                            <div class="col-12">
                                                                <t t-out="record.name.value"/>
                                                            </div>
                                                        </div>
                                                    </t>
                                                </div>
                                            </t>
                                        </templates>

                                        <!-- Others fields -->
                                        <field name="tax_calculation_rounding_method"/>
                                        <field name="currency_id"/>
                                        <field name="company_currency_id"/>
                                        <field name="display_type" force_save="1"/>
                                    </kanban>

                                    <!-- Form view to cover mobile use -->
                                    <form>
                                        <sheet>
                                            <field name="tax_calculation_rounding_method" invisible="1"/>
                                            <field name="display_type" invisible="1"/>
                                            <field name="company_id" invisible="1"/>
                                            <field name="partner_id" invisible="1"/>
                                            <group>
                                                <field name="product_id" widget="many2one_barcode"/>
                                                <field name="quantity"/>
                                                <field name="product_uom_category_id" invisible="1"/>
                                                <field name="product_uom_id" groups="uom.group_uom"/>
                                                <field name="price_unit"/>
                                                <field name="discount" string="Disc.%"/>
                                            </group>
                                            <group>
                                                <field name="account_id" domain="[('company_id', 'parent_of', company_id), ('deprecated', '=', False)]" options="{'no_create': True}" context="{'partner_id': partner_id, 'move_type': parent.move_type}"/>
                                                <field name="tax_ids" widget="many2many_tags"/>
                                                <field name="analytic_distribution" widget="analytic_distribution" groups="analytic.group_analytic_accounting"/>
                                            </group>
                                            <label for="name" string="Description" invisible="display_type in ('line_note', 'line_section')"/>
                                            <label for="name" string="Section" invisible="display_type != 'line_section'"/>
                                            <label for="name" string="Note" invisible="display_type != 'line_note'"/>
                                            <field name="name" widget="text"/>
                                            <group>
                                                <field name="price_subtotal" string="Tax excl."/>
                                                <field name="price_total" string="Tax incl." invisible="tax_calculation_rounding_method == 'round_globally'" optional="hide"/>
                                            </group>
                                        </sheet>
                                    </form>
                                </field>
                                <group col="12" class="oe_invoice_lines_tab">
                                    <group colspan="8">
                                        <field name="narration" placeholder="Terms and Conditions" colspan="2" nolabel="1"/>
                                    </group>
                                    <!-- Totals (only invoices / receipts) -->
                                    <group colspan="4">
                                        <group class="oe_subtotal_footer" invisible="move_type not in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt') or payment_state == 'invoicing_legacy'">

                                            <field name="tax_totals" widget="account-tax-totals-field" nolabel="1" colspan="2" readonly="state != 'draft' or (move_type not in ('in_invoice', 'in_refund', 'in_receipt') and not quick_edit_mode)"/>

                                            <field name="invoice_payments_widget" colspan="2" nolabel="1" widget="payment"/>
                                            <field name="amount_residual" class="oe_subtotal_footer_separator" invisible="state == 'draft'"/>
                                        </group>
                                        <field name="invoice_outstanding_credits_debits_widget" class="oe_invoice_outstanding_credits_debits" colspan="2" nolabel="1" widget="payment" invisible="state != 'posted'"/>
                                    </group>
                                </group>
                            </page>
                            <page id="aml_tab" string="Journal Items" groups="account.group_account_readonly" name="aml_tab">
                                <field name="line_ids" mode="tree,kanban" context="{                                            'default_move_type': context.get('default_move_type'),                                            'line_ids': line_ids,                                            'journal_id': journal_id,                                            'default_partner_id': commercial_partner_id,                                            'default_currency_id': currency_id or company_currency_id,                                            'kanban_view_ref': 'account.account_move_line_view_kanban_mobile',                                        }" invisible="payment_state == 'invoicing_legacy' and move_type != 'entry'" readonly="state != 'draft'">
                                    <tree editable="bottom" string="Journal Items" decoration-muted="display_type in ('line_section', 'line_note')" default_order="sequence, id">
                                        <!-- Displayed fields -->
                                        <field name="account_id" invisible="display_type in ('line_section', 'line_note')" required="display_type not in ('line_section', 'line_note')" domain="[('company_id', 'parent_of', parent.company_id), ('deprecated', '=', False)]"/>
                                        <field name="partner_id" optional="show" domain="['|', ('parent_id', '=', False), ('is_company', '=', True)]" column_invisible="parent.move_type != 'entry'"/>
                                        <field name="name" widget="section_and_note_text" optional="show"/>
                                        <field name="analytic_distribution" widget="analytic_distribution" groups="analytic.group_analytic_accounting" optional="show" options="{'account_field': 'account_id'}" business_domain_compute="parent.move_type in ['out_invoice', 'out_refund', 'out_receipt'] and 'invoice' or parent.move_type in ['in_invoice', 'in_refund', 'in_receipt'] and 'bill' or 'general'"/>
                                        <field name="date_maturity" optional="hide" invisible="display_type in ('line_section', 'line_note')" column_invisible="context.get('view_no_maturity')"/>
                                        <field name="amount_currency" groups="base.group_multi_currency" optional="hide"/>
                                        <field name="currency_id" options="{'no_create': True}" optional="hide" groups="base.group_multi_currency" column_invisible="parent.move_type != 'entry'"/>
                                        <field name="tax_ids" widget="autosave_many2many_tags" optional="hide" domain="[('type_tax_use', '=?', parent.invoice_filter_type_domain)]" context="{'append_type_to_tax_name': not parent.invoice_filter_type_domain, 'active_test': True}" options="{'no_create': True}" force_save="1" readonly="display_type in ('line_section', 'line_note') or tax_line_id or (parent.move_type in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt') and account_type in ('asset_receivable', 'liability_payable'))"/>
                                        <field name="debit" sum="Total Debit" invisible="display_type in ('line_section', 'line_note')" readonly="parent.move_type in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt') and display_type in ('line_section', 'line_note', 'product')"/>
                                        <field name="credit" sum="Total Credit" invisible="display_type in ('line_section', 'line_note')" readonly="parent.move_type in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt') and display_type in ('line_section', 'line_note', 'product')"/>
                                        <field name="balance" column_invisible="True"/>
                                        <field name="discount_date" string="Discount Date" optional="hide"/>
                                        <field name="discount_amount_currency" string="Discount Amount" optional="hide"/>

                                        <field name="tax_tag_ids" widget="many2many_tags" string="Tax Grids" optional="show" options="{'no_create': True}" domain="[                                                     ('applicability', '=', 'taxes'),                                                     '|', ('country_id', '=', parent.tax_country_id),                                                     ('country_id', '=', False),                                                 ]"/>

                                        <field name="tax_tag_invert" readonly="1" optional="hide" groups="base.group_no_one"/>

                                        <!-- Buttons -->
                                        <button name="action_automatic_entry" type="object" icon="fa-calendar" string="Cut-Off" aria-label="Change Period" class="float-end" column_invisible="parent.move_type == 'entry' or parent.state != 'posted'" invisible="account_internal_group not in ('income', 'expense')" context="{'default_action': 'change_period'}"/>

                                        <!-- Others fields -->
                                        <field name="tax_line_id" column_invisible="True"/>
                                        <field name="company_currency_id" column_invisible="True"/>
                                        <field name="display_type" force_save="1" column_invisible="True"/>
                                        <field name="company_id" column_invisible="True"/>
                                        <field name="sequence" column_invisible="True"/>
                                        <field name="id" column_invisible="True"/>
                                        <field name="account_internal_group" column_invisible="True"/>
                                        <field name="account_type" column_invisible="True"/>
                                    </tree>
                                    <!-- Form view to cover mobile use -->
                                    <form>
                                      <group>
                                        <field name="account_id" domain="[('company_id', 'parent_of', parent.company_id), ('deprecated', '=', False)]"/>
                                        <field name="partner_id" domain="['|', ('parent_id', '=', False), ('is_company', '=', True)]"/>
                                        <field name="name"/>
                                        <field name="analytic_distribution" widget="analytic_distribution" groups="analytic.group_analytic_accounting"/>
                                        <field name="amount_currency" groups="base.group_multi_currency"/>
                                        <field name="company_currency_id" invisible="1"/>
                                        <field name="company_id" invisible="1"/>
                                        <field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/>
                                        <field name="debit" sum="Total Debit"/>
                                        <field name="credit" sum="Total Credit"/>
                                        <field name="balance" invisible="1"/>
                                        <field name="tax_ids" string="Taxes Applied" widget="autosave_many2many_tags" options="{'no_create': True}"/>
                                        <field name="date_maturity" required="0" invisible="context.get('view_no_maturity', False)"/>
                                      </group>
                                    </form>
                                </field>
                                <div class="alert alert-info text-center mb-0" role="alert" invisible="payment_state != 'invoicing_legacy' or move_type == 'entry'">
                                    <span>This entry has been generated through the Invoicing app, before installing Accounting. Its balance has been imported separately.</span>
                                </div>
                            </page>
                            <page id="other_tab" string="Other Info" name="other_info" invisible="move_type not in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund')">
                                <group id="other_tab_group">
                                    <group string="Invoice" name="sale_info_group" invisible="move_type not in ('out_invoice', 'out_refund')">
                                        <label for="ref" string="Customer Reference"/>
                                        <field name="ref" nolabel="1"/>
                                        <field name="user_id" invisible="1" force_save="1"/>
                                        <field name="invoice_user_id" domain="[('share', '=', False)]" widget="many2one_avatar_user"/>
                                        <field name="invoice_origin" string="Source Document" force_save="1" invisible="1"/>
                                        <field name="partner_bank_id" context="{'default_partner_id': bank_partner_id, 'display_account_trust': True}" domain="[('partner_id', '=', bank_partner_id)]" readonly="state != 'draft'"/>
                                        <field name="qr_code_method" invisible="not display_qr_code"/>
                                        <field name="delivery_date" readonly="state != 'draft'"/>
                                    </group>
                                    <group string="Accounting" name="accounting_info_group" invisible="move_type not in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund')">
                                        <field name="company_id" groups="base.group_multi_company"/>
                                        <field name="invoice_incoterm_id"/>
                                        <field name="incoterm_location"/>
                                        <field name="fiscal_position_id" readonly="state in ['cancel', 'posted']"/>
                                        <field name="invoice_cash_rounding_id" groups="account.group_cash_rounding" readonly="state != 'draft'"/>
                                        <field name="invoice_source_email" widget="email" invisible="move_type not in ('in_invoice', 'in_refund') or not invoice_source_email"/>
                                        <field name="auto_post" readonly="state != 'draft'"/>
                                        <field name="auto_post_until" invisible="auto_post in ('no', 'at_date')" readonly="state != 'draft'"/>
                                        <field name="to_check"/>
                                    </group>
                                </group>
                            </page>
                            <page id="other_tab_entry" string="Other Info" name="other_info" invisible="move_type != 'entry'">
                                <group id="other_tab_entry_group">
                                    <group name="misc_group">
                                        <field name="auto_post" invisible="move_type != 'entry'" readonly="state != 'draft'"/>
                                        <field name="reversed_entry_id" invisible="move_type != 'entry' or not reversed_entry_id"/>
                                        <field name="auto_post_until" invisible="auto_post in ('no', 'at_date')" readonly="state != 'draft'"/>
                                        <field name="to_check" invisible="move_type != 'entry'"/>
                                    </group>
                                    <group>
                                        <field name="fiscal_position_id" readonly="state in ['cancel', 'posted']"/>
                                        <field name="company_id" groups="base.group_multi_company" required="1"/>
                                    </group>
                                </group>
                                <!-- Internal note -->
                                <field name="narration" placeholder="Add an internal note..." nolabel="1" height="50"/>
                            </page>
                        </notebook>
                    </sheet>
                    <!-- Attachment preview -->
                    <div class="o_attachment_preview" invisible="move_type not in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund') or state != 'draft'"/>
                    <!-- Chatter -->
                    <div class="oe_chatter">
                        <field name="message_follower_ids" groups="base.group_user"/>
                        <field name="activity_ids"/>
                        <field name="message_ids"/>
                    </div>
                </form>