acc_account_view.xml 6.9 KB
<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="view_order_form_inherit" model="ir.ui.view">
            <field name="name">acc.account.invoice.supplier.form</field>
            <field name="model">account.invoice</field>
            <field name="inherit_id" ref="account.invoice_supplier_form"/>
            <field name="arch" type="xml">
                <!-- <xpath expr="//button[@name='action_invoice_open']" position="before">
                    <button name="teller_accept" string="出纳审核" type="object" states="open" class="oe_highlight" groups="acct_base.acc_account_user_group"/>   
                </xpath> -->
                <xpath expr="//button[@name='action_invoice_open']" position="before">
                    <button name="boss_accept" string="财务经理审核" type="object" states="teller" class="oe_highlight" groups="account.group_account_manager"/>   
                </xpath>
                <xpath expr="//button[@name='action_invoice_open']" position="after">
                    <button name="get_poqty" string="获取订购数量" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>   
                </xpath>
                <xpath expr="//button[@name='action_invoice_open']" position="after">
                    <button name="add_discount_line" string="添加折扣" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>   
                </xpath>
                <xpath expr="//field[@name='reference']" position="after">
                    <field name="invoice_company"/>
                    <!-- <field name="invoice_number"/> -->
                    <field name="payment_rule"/>
                    <field name="pay_rate"/>
                    <field name="minus_amount"/>
                    <field name="invoice_acc_total"/>
                    <field name="invoice_state"/>
                </xpath>
                <xpath expr="//field[@name='state']" position="attributes">
                    <attribute name="statusbar_visible">draft,teller,open,paid</attribute>
                </xpath>
                <xpath expr="/form/sheet/notebook/page[@name='other_info']" position="after">
                    <page string="发票记录">
                        <field name="payrecord_line">
                            <tree string="发票记录" editable="bottom">
                                <field name="invoice_number"/>
                                <field name="invoice_datetime"/>
                                <field name="pay_amount"/>
                                <field name="pay_datetime"/>                           
                                <field name="pay_user"/>
                            </tree>
                        </field>
                        <group class="oe_subtotal_footer oe_right">
                            <field name="invoice_acc_total" nolabel="1" widget="monetary" options="{'currency_field': 'currency_id'}" class="oe_subtotal_footer_separator" />
                        </group>
                    </page>
                </xpath>                      
            </field>
        </record>
<!-- sale invoice -->
        <record id="acccustomer_view_order_form_inherit" model="ir.ui.view">
            <field name="name">acc.account.invoice.customer.form</field>
            <field name="model">account.invoice</field>
            <field name="inherit_id" ref="account.invoice_form"/>
            <field name="arch" type="xml">
                <!-- <xpath expr="//button[@name='action_invoice_open']" position="before">
                    <button name="teller_accept" string="出纳审核" type="object" states="open" class="oe_highlight" groups="acct_base.acc_account_user_group"/>   
                </xpath> -->
                <xpath expr="//button[@name='action_invoice_open']" position="before">
                    <button name="boss_accept" string="财务审核" type="object" states="teller" class="oe_highlight" groups="acct_base.acc_account_user_group"/>   
                </xpath>
                <xpath expr="//button[@name='action_invoice_open']" position="after">
                    <button name="add_sale_discount_line" string="添加折扣" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>   
                </xpath>
                <!-- <xpath expr="//button[@name='action_invoice_open']" position="after">
                    <button name="get_poqty" string="获取订购数量" type="object" states="draft" class="oe_highlight" groups="base.group_user"/>   
                </xpath> -->
                <xpath expr="//field[@name='date_invoice']" position="attributes">
                    <attribute name="string">制单日期</attribute>
                </xpath>
                <xpath expr="//field[@name='payment_term_id']" position="after">
                    <field name="invoice_company"/>
                    <!-- <field name="sale_invoice_number"/> -->
                    <field name="sale_invoice_date"/>
                    <field name="acct_note"/>
                    <field name="invoice_acc_total"/>
                </xpath>
                <xpath expr="//field[@name='state']" position="attributes">
                    <attribute name="statusbar_visible">draft,teller,open,paid</attribute>
                </xpath>
                <xpath expr="/form/sheet/notebook/page[@name='other_info']" position="after">
                    <page string="发票记录">
                        <field name="payrecord_line">
                            <tree string="发票记录" editable="bottom">
                                <field name="invoice_number"/>
                                <field name="pay_amount"/>
                                <field name="pay_datetime"/>                           
                                <field name="pay_user"/>
                            </tree>
                        </field>
                        <group class="oe_subtotal_footer oe_right">
                            <field name="invoice_acc_total" nolabel="1" widget="monetary" options="{'currency_field': 'currency_id'}" class="oe_subtotal_footer_separator" />
                        </group>
                    </page>
                </xpath>                      
            </field>
        </record>

        <!-- account.invoice tree视图 -->
        <!-- <record model="ir.ui.view" id="account_invoice_acc_tree_view">
            <field name="name">account.invoice.acc.tree</field>
            <field name="model">account.invoice</field>
            <field name="inherit_id" ref="product.product_template_tree_view"/>
            <field name="arch" type="xml">
                <field name="name" position="after">
                    <field name="internal_des"/>
                    <field name="partner_code"/>
                    <field name="product_model"/>
                </field>
            </field>
        </record> -->
    </data>
</openerp>