Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
4759 Lượt xem

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}"/>



Ảnh đại diện
Huỷ bỏ

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

Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất
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>


Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

I want to add to the button groups = " "

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

Ảnh đại diện
Huỷ bỏ