Skip to Content
Menú
This question has been flagged
1 Respondre
5283 Vistes

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?

Avatar
Descartar
Best Answer

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

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de març 25
2141
1
d’oct. 25
5858
1
d’oct. 22
11886
7
de gen. 22
19584
1
de gen. 24
15736