跳至內容
選單
此問題已被標幟
2 回覆
4851 瀏覽次數

How to Overwrite each item (please see attached image).



I tried this code, but it creates another item, it does not overwrite the existing one.



Anyone can help?

頭像
捨棄
最佳答案

Hi,

Try this:

<template id="purchase.portal_my_home_purchase" name="Show Purchase Orders" customize_show="True" inherit_id="portal.portal_my_home" priority="25">
<xpath expr="//div[hasclass('o_portal_docs')]" position="inside">
<t t-call="portal.portal_docs_entry">
<t t-set="title">Purchase Orders Changed</t>
<t t-set="url" t-value="'/my/purchase'"/>
<t t-set="placeholder_count" t-value="'purchase_count'"/>
</t>
</xpath>
</template>

Thanks

頭像
捨棄
最佳答案
<template id="portal_my_home_purchase_changed" inherit_id="purchase.portal_my_home_purchase">
<xpath expr="//t[@t-set='title']" position="replace">
<t t-set="title" t-value="'Purchase Orders XXX'"/>
</xpath>
</template>

This will change the title.
Regards
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
9月 22
3456
1
1月 23
2578
2
6月 22
3954
1
4月 22
2732
0
4月 22
4122