2014-11-04 31 views
0

我想在OpenERP上重命名頁面的字符串。具體而言,費用模塊上的'描述'頁面。OpenERP - 重命名頁面字符串

我無法通過xpath代碼繼承此頁面,因爲頁面本身沒有名稱,您無法通過attrs字段更改標籤/字符串。下面是我試圖做到這一點但它失敗的碼:

<xpath expr="/form/sheet/notebook/page[@string='Description']" position = "attributes"> 
     <attriute name = "string" = "Expenses"/> 
</xpath> 

必須有辦法做到這一點,但我似乎無法弄清楚如何。

回答

1

試試這個,

<xpath expr="//form/sheet/notebook/page[@string='Description']" position = "attributes"> 
    <attriute name = "string">Expenses</attriute> 
</xpath> 

對於像

<xpath expr="path_of_field/page/group/whatever" position = "attributes"> 
    <attriute name = "attribute_name"> here is value </attriute> 
</xpath> 

希望這將幫助你默認屬性。

+0

謝謝!工作完美:) – 2014-11-04 10:36:55