跳至內容
選單
此問題已被標幟
1 回覆
5349 瀏覽次數

I want to remove the option and button "Register Payment" from all invoices but I can't find the view I need to alter.

I want to force accounts to use the Customer Payments and Supplier Payments instead of directly using the Register Payment on the invoices.

So where can I find the place to remove this button?

頭像
捨棄
最佳答案

Hi

    <record id="view_invoice_customer_1" model="ir.ui.view">
        <field name="name">account.invoice.customer.test</field>
        <field name="model">account.invoice</field>
        <field name="inherit_id" ref="account_voucher.view_invoice_customer"/>
        <field name="arch" type="xml">
            <xpath expr="//button[@name='invoice_pay_customer']" position="replace">
                <button name="invoice_pay_customer" type="object" string="Register Payment"
                    attrs="{'invisible': ['|', ('state','!=','open'), ('sent','=',True)]}" groups="base.group_user" invisible="1"/>

            </xpath>
        </field>
    </record>

hope this will help you

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
3月 25
2154
1
10月 25
5890
1
10月 22
11900
7
1月 22
19622
1
1月 24
15758