OpenERP - 重命名页面字符串

时间:2014-11-04 10:26:54

标签: xml openerp openerp-7 odoo

我想在OpenERP上重命名页面的字符串。具体而言,费用模块上的“描述”页面。

我无法通过xpath代码继承此内容,因为页面本身没有名称,您无法通过attrs字段更改标签/字符串。下面是我尝试执行此操作的代码,但失败了:

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

必须有办法做到这一点,但我似乎无法弄清楚如何。

1 个答案:

答案 0 :(得分: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>

希望这会对你有所帮助。