更改销售模块视图、树状结构、名称、按钮名称

2024-09-30 12:24:22 发布

您现在位置:Python中文网/ 问答频道 /正文

例如,我需要在openerp'ssale模块的treeview中进行更改,只需修改quotationsale order的{}

为了实现这一点,我制作了一个全新的模块(init\u openerp\视图.xml文件)

我将继承view,然后用xpath重写名称,问题是,我仍然无法完成它,它给了我一个

ERROR:RELAXNGV:RELAXNG_ERR_ELEMWRONG: Did not expect element record there

我的代码是:

^{pr2}$

非常感谢您的帮助

提前谢谢!

编辑:

例如,我需要将Quotation改为Solicitud de Servicios,或者将Sale Order改为{}。


Tags: 模块文件名称view视图initordererror
2条回答

不要更换树。试试属性='position'

<xpath expr="/tree[@string='Quotation']" position="attributes">
    <attribute name="string">Servicios</attribute>
</xpath>

使用

<record id="view_quotation_tree" model="ir.ui.view" >
<field name="name">sale.order.tree.inherit</field>
<field name="model">sale.order</field>
<field name="type">tree</field>
<field name="inherit_id" ref="sale.view_quotation_tree"/>
<field name="arch" type="xml">
 <xpath expr="//tree[@string='Quotation']" position="attributes">
    <attribute name="string">Servicios</attribute>
</xpath>
</field>

相关问题 更多 >

    热门问题