Skip to Content
āđ€āļĄāļ™āļđ
āļ„āļļāļ“āļ•āđ‰āļ­āļ‡āļĨāļ‡āļ—āļ°āđ€āļšāļĩāļĒāļ™āđ€āļžāļ·āđˆāļ­āđ‚āļ•āđ‰āļ•āļ­āļšāļāļąāļšāļ„āļ­āļĄāļĄāļđāļ™āļīāļ•āļĩāđ‰
āļ„āļģāļ–āļēāļĄāļ™āļĩāđ‰āļ–āļđāļāļ•āļąāđ‰āļ‡āļ„āđˆāļēāļŠāļ–āļēāļ™āļ°
3 āļ•āļ­āļšāļāļĨāļąāļš
1258 āļĄāļļāļĄāļĄāļ­āļ‡

Hello guys i was wondering if some one knows how to hide On-time Rate button that exists in res.partner view if someone knows how please repond 😊


Im working on odoo 18 

āļ­āļ§āļ•āļēāļĢ
āļĨāļ°āļ—āļīāđ‰āļ‡

Inherite the view purchase_stock.res_partner_view_purchase_buttons_inherit and add an invisible=1 to the button.

āļ„āļģāļ•āļ­āļšāļ—āļĩāđˆāļ”āļĩāļ—āļĩāđˆāļŠāļļāļ”

Hi Zahtoot,

You can achieve this by using the following XML code to modify the view:


   <record id="view_res_partner_hide_on_time_rate_by_text" model="ir.ui.view">

            <field name="name">res.partner.hide.on.time.rate.by.text</field>

            <field name="model">res.partner</field>

            <field name="inherit_id" ref="purchase_stock.res_partner_view_purchase_buttons_inherit"/>

            <field name="arch" type="xml">

            <xpath expr="//button[.//field[@name='on_time_rate']]" position="attributes">

                    <attribute name="invisible">1</attribute>

                </xpath>

            </field>

        </record>


I Hope this information will helpful to you.

Thanks & Regards,

Email:  odoo@aktivsoftware.com           

Skype: kalpeshmaheshwari

āļ­āļ§āļ•āļēāļĢ
āļĨāļ°āļ—āļīāđ‰āļ‡
āļœāļđāđ‰āđ€āļ‚āļĩāļĒāļ™

thanks brother i was doing the same in my code but without the .// before field in the xpath thanks you 🙂

āļ„āļģāļ•āļ­āļšāļ—āļĩāđˆāļ”āļĩāļ—āļĩāđˆāļŠāļļāļ”

Hi,

Try the below code:

 <record id="res_partner_view_purchase_buttons_inherit" model="ir.ui.view">

            <field name="name">res.partner.purchase.stock.form.inherit</field>

            <field name="model">res.partner</field>

            <field name="inherit_id" ref="purchase.res_partner_view_purchase_buttons"/>

            <field name="arch" type="xml">

                        <xpath expr="//button[@name='%(action_purchase_vendor_delay_report)d']"

position="attributes">

                             <attribute name="invisible">1</attribute>

                         </xpath>

             </field>

</record>


Hope it helps

āļ­āļ§āļ•āļēāļĢ
āļĨāļ°āļ—āļīāđ‰āļ‡
āļ„āļģāļ•āļ­āļšāļ—āļĩāđˆāļ”āļĩāļ—āļĩāđˆāļŠāļļāļ”

Hello Zahtood,

open partner form view and activate studio by clicking on studio icon at top right corner.

click on button "on-time rate" and at left panel select invisible checkbox to hide that button.

 


Thanks & Regards,

​

CandidRoot Solutions Pvt. Ltd.

Mobile: (+91) 8849036209

Email: info@candidroot.com

āļ­āļ§āļ•āļēāļĢ
āļĨāļ°āļ—āļīāđ‰āļ‡
āļœāļđāđ‰āđ€āļ‚āļĩāļĒāļ™

thanks for the respond but im looking for coding solution im making a custom module and i need to hide this button thanks again 😃

Related Posts āļ•āļ­āļšāļāļĨāļąāļš āļĄāļļāļĄāļĄāļ­āļ‡ āļāļīāļˆāļāļĢāļĢāļĄ
Modify header buttons based on condition in res.partner āđāļāđ‰āđ„āļ‚āđāļĨāđ‰āļ§
3
āļĄāļī.āļĒ. 25
1303
1
āļ.āļ„. 25
1796
Can't select city field from res.partner inherited form view āđāļāđ‰āđ„āļ‚āđāļĨāđ‰āļ§
1
āļĄ.āļ„. 22
2798
0
āļĄāļĩ.āļ„. 15
3164
extending base.view_partner_form āđāļāđ‰āđ„āļ‚āđāļĨāđ‰āļ§
1
āļž.āļ„. 22
2680