Skip to Content
Menu
This question has been flagged
3 Replies
4303 Views

hello I am a beginner in Odoo so I want to customize the buttons when found in the header
how do i call these button in my code

<button name="action_rfq_send" states="draft" string="Send RFQ by Email" type="object" context="{'send_rfq':True}" class="oe_highlight"/>

<button name="action_rfq_send" states="sent" string="Re-Send RFQ by Email" type="object" context="{'send_rfq':True}"/>



Avatar
Discard

what is your need? remove it or add in your new custom view?

Best Answer

Hi,

<record id="purchase_order_inherit" model="ir.ui.view">
<field name="name">purchase.order</field>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='action_rfq_send']" position="attributes">                                    
<attribute name="groups">your_group_name</attribute>
</xpath>
</field>
</record>


This will help you to replace the button, as per your need you can change it.


Thanks

Avatar
Discard
Best Answer
My code doesn't work, please help me:
<odoo><data>
<recordid="account_view_bank_statement_form_inherit"model="ir.ui.view"><fieldname="name">account.view.bank.statement.form.inheritfield><fieldname="model">account.bank.statementfield><fieldname="inherit_id"ref="account.view_bank_statement_form"/><fieldname="arch"type="xml"><buttonname='button_post'position="attributes"><attributename="groups">restrictions_for_bank_statements_and_reconciliation.group_publicar_extractos_bancariosattribute>button>
<xpathexpr="//button[@name='button_validate_or_action']"position="attributes"><attributename="groups">restrictions_for_bank_statements_and_reconciliation.group_validar_extractos_bancariosattribute>xpath>field>record>
data>odoo>


Avatar
Discard
Author Best Answer

I want to add to the button groups = " "

how do i call these button in my code and add groups = " "

Avatar
Discard