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ย
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- ํ๊ณ
- ์ฌ๊ณ ๊ด๋ฆฌ
- PoS
- ํ๋ก์ ํธ
- MRP
์ ๊ณ ๋ ์ง๋ฌธ์ ๋๋ค
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 ๐
ํ ๋ก ์ด ์ฌ๋ฏธ์์ผ์ ๊ฐ์? ์ง์ ์ฐธ์ฌํด๋ณด์ธ์!
์ง๊ธ ๋ฐ๋ก ๊ฐ์ ํ์ฌ ๋ ์ ์๋น์ค๋ฅผ ์ด์ฉํด๋ณด๊ณ ํน๋ณํ ์ปค๋ฎค๋ํฐ์ ์ํตํ์ธ์!
๊ฐ์| ๊ด๋ จ ๊ฒ์๋ฌผ | ๋ต๊ธ | ํ๋ฉด | ํ๋ | |
|---|---|---|---|---|
|
Modify header buttons based on condition in res.partner
ํด๊ฒฐ ์๋ฃ
|
|
3
6์ 25
|
2110 | |
|
|
1
7์ 25
|
2863 | ||
|
|
1
1์ 22
|
3412 | ||
|
|
0
3์ 15
|
3560 | ||
|
extending base.view_partner_form
ํด๊ฒฐ ์๋ฃ
|
|
1
5์ 22
|
3558 |
Inherite the view purchase_stock.res_partner_view_purchase_buttons_inherit and add an invisible=1 to the button.