<commit_before><?xml version="1.0" encoding="UTF-8"?>
<openerp>
    <data>
        <record model="ir.ui.view" id="view_voucher_tree">
            <field name="name">account.voucher.tree</field>
            <field name="model">account.voucher</field>
            <field name="arch" type="xml">
                <tree colors="blue:state == 'draft';gray:state == 'cancel';red:audit" string="Voucher Entries">
                    <field name="date"/>
                    <field name="number"/>
                    <field name="reference"/>
                    <field name="partner_id"/>
                    <field name="journal_id" groups="account.group_account_user"/>
                    <field name="period_id" invisible="context.get('visible', True)"/>
                    <field name="type" invisible="context.get('visible', True)"/>
                    <field name="amount" sum="Total Amount"/>
                    <field name="audit" invisible="1"/>
                    <field name="state"/>
                </tree>
            </field>
        </record>
        <record model="ir.ui.view" id="view_voucher_line_form">
            <field name="name">account.voucher.line.form</field>
            <field name="model">account.voucher.line</field>
            <field name="arch" type="xml">
                <form string="Voucher Lines" version="7.0">
                    <group col="4">
                        <field name="name"/>
                        <field name="account_id"/>
                        <field name="partner_id"/>
                        <field name="amount"/>
                    </group>
                </form>
            </field>
        </record>

        <record model="ir.ui.view" id="view_voucher_form">
            <field name="name">account.voucher.form</field>
            <field name="model">account.voucher</field>
            <field name="arch" type="xml">
                <form string="Accounting Voucher" version="7.0">
                  <header>
                      <button name="proforma_voucher" string="Post" states="draft" class="oe_highlight"/>
                      <button name="cancel_voucher" string="Cancel" type="object" states="posted" confirm="Are you sure to unreconcile this record?"/>
                      <button name="cancel_voucher" string="Cancel" states="draft,proforma" />
                      <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
                      <field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
                  </header>
                  <sheet string="Accounting Voucher">
                    <group col="6" colspan="4">
                        <field name="partner_id" required="1" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/>
                        <field name="payment_rate_currency_id" invisible="1"/>
                        <field name="date" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id)"/>
                        <field name="journal_id" widget="selection" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/>
                        <field name="type" required="1"/>
                        <field name="name" colspan="2"/>
                        <field name="company_id" widget="selection" groups="base.group_multi_company"/>
                        <field name="reference"/>
                        <field name="account_id" widget="selection" invisible="True"/>
                    </group>
                    <notebook colspan="4">
                        <page string="Voucher Entry">
                            <field name="line_ids" on_change="onchange_price(line_ids, tax_id, partner_id)" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}">
                                <tree string="Voucher Items" editable="bottom">
                                    <field name="account_id"/>
                                    <field name="name"/>
                                    <field name="amount" sum="Total Amount"/>
                                    <field name="type"/>
                                    <field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
                                </tree>
                            </field>
                            <group col="3">
                                <group string="Internal Notes">
                                    <field name="narration" colspan="2" nolabel="1"/>
                                </group>
                                <group string="Other Information">
                                    <field name="number"/>
                                    <field name="currency_id" groups="base.group_multi_currency"/>
                                </group>
                                <group col="4" attrs="{'invisible':[('type','in',['payment', 'receipt', False])]}">
                                    <separator string="Total" colspan="4"/>
                                    <field name="tax_id" on_change="onchange_price(line_ids, tax_id, partner_id)" widget="selection"/>
                                    <field name="tax_amount" nolabel="1"/>
                                    <button type="object" icon="terp-stock_format-scientific" name="compute_tax" string="Compute Tax" attrs="{'invisible': [('state','!=','draft')]}"/>
                                    <label colspan="1" string=""/><field name="amount" string="Total"/>
                                </group>
                            </group>
                        </page>
                        <page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}">
                            <group col="4">
                                <field name="period_id"/>
                                <field name="audit"/>
                            </group>
                            <field name="move_ids" readonly="1">
                               <tree string="Journal Items"><commit_msg>[IMP]: Improve a form view<commit_after><?xml version="1.0" encoding="UTF-8"?>
<openerp>
    <data>
        <record model="ir.ui.view" id="view_voucher_tree">
            <field name="name">account.voucher.tree</field>
            <field name="model">account.voucher</field>
            <field name="arch" type="xml">
                <tree colors="blue:state == 'draft';gray:state == 'cancel';red:audit" string="Voucher Entries">
                    <field name="date"/>
                    <field name="number"/>
                    <field name="reference"/>
                    <field name="partner_id"/>
                    <field name="journal_id" groups="account.group_account_user"/>
                    <field name="period_id" invisible="context.get('visible', True)"/>
                    <field name="type" invisible="context.get('visible', True)"/>
                    <field name="amount" sum="Total Amount"/>
                    <field name="audit" invisible="1"/>
                    <field name="state"/>
                </tree>
            </field>
        </record>
        <record model="ir.ui.view" id="view_voucher_line_form">
            <field name="name">account.voucher.line.form</field>
            <field name="model">account.voucher.line</field>
            <field name="arch" type="xml">
                <form string="Voucher Lines" version="7.0">
                    <group col="4">
                        <field name="name"/>
                        <field name="account_id"/>
                        <field name="partner_id"/>
                        <field name="amount"/>
                    </group>
                </form>
            </field>
        </record>

        <record model="ir.ui.view" id="view_voucher_form">
            <field name="name">account.voucher.form</field>
            <field name="model">account.voucher</field>
            <field name="arch" type="xml">
                <form string="Accounting Voucher" version="7.0">
                  <header>
                      <button name="proforma_voucher" string="Post" states="draft" class="oe_highlight"/>
                      <button name="cancel_voucher" string="Cancel" type="object" states="posted" confirm="Are you sure to unreconcile this record?"/>
                      <button name="cancel_voucher" string="Cancel" states="draft,proforma" />
                      <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
                      <field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
                  </header>
                  <sheet string="Accounting Voucher">
                    <group col="4" colspan="4">
                        <field name="partner_id" required="1" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/>
                        <field name="date" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id)"/>
                        <field name="journal_id" widget="selection" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/>
                        <field name="type" required="1"/>
                        <field name="name" colspan="2"/>
                        <field name="company_id" widget="selection" groups="base.group_multi_company"/>
                        <field name="reference"/>
                        <field name="number"/>
                        <field name="currency_id" groups="base.group_multi_currency"/>
                        <field name="account_id" widget="selection" invisible="True"/>
                        <field name="payment_rate_currency_id" invisible="1"/>
                    </group>
                    <notebook colspan="4">
                        <page string="Voucher Entry">
                            <field name="line_ids" on_change="onchange_price(line_ids, tax_id, partner_id)" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}">
                                <tree string="Voucher Items" editable="bottom">
                                    <field name="account_id"/>
                                    <field name="name"/>
                                    <field name="amount" sum="Total Amount"/>
                                    <field name="type"/>
                                    <field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
                                </tree>
                            </field>
                            <group>
                                <field name="narration" nolabel="1" placeholder="Internal Notes"/>
                                <group class="oe_subtotal_footer oe_right" attrs="{'invisible':[('type','in',['payment', 'receipt', False])]}">
                                    <field name="tax_id" on_change="onchange_price(line_ids, tax_id, partner_id)" widget="selection" nolabel="1"/>
                                    <field name="tax_amount" nolabel="1"/>
                                    <div class="oe_subtotal_footer_separator">
                                        <label for="amount"/>
                                        <button type="object" icon="terp-stock_format-scientific"   name="compute_tax" class="oe_link oe_edit_only" string="(Update)" attrs="{'invisible': [('state','!=','draft')]}"/>
                                    </div>
                                    <field name="amount" class="oe_subtotal_footer_separator" nolabel="1"/>
                                </group>
                            </group>
                        </page>
                        <page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}">
                            <group col="4">
                                <field name="period_id"/>
                                <field name="audit"/>
                            </group>
                            <field name="move_ids" readonly="1">
                               <tree string="Journal Items">
{'fraction_non_alphanumeric': 0.13816911704979287, 'fraction_numerical': 0.0038177239866785803, 'mean_word_length': 1.4998984771573605, 'pattern_counts': {'":': 2, '<': 202, '<?xml version=': 2, '>': 202, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6431442', 'n_tokens_mistral': 3153, 'n_tokens_neox': 2977, 'n_words': 563}