تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
1137 أدوات العرض

Hii,

i want ro remove or hide the alert from the header part

how do we remove the class='alert alert-dismissible alert-info' or role alert from the header part

thanks in advance

الصورة الرمزية
إهمال
أفضل إجابة

Hi,

You can inherit the view and using the xpath you can locate the required node and remove/replace it.

See a sample of xpath:


<xpath expr="//div[@role='alert']" position="replace"/>



Thanks

الصورة الرمزية
إهمال
الكاتب

<record id="alert_crm_issue_form_inherit" model="ir.ui.view">
<field name="name">crm.issue.form.inherit</field>
<field name="model">crm.issue</field>
<field name="inherit_id" ref="crm_issue.crm_issue_view_form"/>
<field name="arch" type="xml">

<xpath expr="//div[@role='alert']" position="replace">
</xpath>

<!-- alert alert-dismissible alert-info-->

</field>
</record>
but it shows <xpath expr="//div[@role='alert']">' cannot be located in parent view

as the view referred in the inherit is a third party app, can you confirm that a div with role is existing in view: crm_issue_view_form

الكاتب

yes its a thirty party app but when i save the form
<t t-name="translation-alert">
<t t-foreach="fields" t-as="field">
<div>
You have updated <strong><t t-esc="field.string"/></strong> (<t t-esc="lang"/>).
<a class="oe_field_translate" t-att-name="field.name" href="#">Update translations</a>
</div>
</t>
</t>
this alert will showing how can i remove this?