콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
1062 화면

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?