【发布时间】:2013-12-04 05:38:32
【问题描述】:
例如,我需要更改 openerp's 的 treeview sale 模块,只需更改 quotation 和 sale order 的 tree strings 和 sale order
为此,我正在制作一个全新的模块(init _openerp_ 和 view.xml 文件)
我将继承view 然后用xpath 覆盖名称问题是,我仍然无法完成它,它给了我一个
ERROR:RELAXNGV:RELAXNG_ERR_ELEMWRONG: Did not expect element record there
我的代码是:
<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="replace">
<tree string="Servicios" fonts="bold:message_unread==True" colors="grey:state=='cancel';blue:state in ('waiting_date','manual');red:state in ('invoice_except','shipping_except')">
</tree>
</xpath>
</field>
任何帮助将不胜感激,
提前致谢!
编辑:
例如,我需要将标题Quotation 更改为Solicitud de Servicios,或将Sale Order 更改为Compra de Servicios。
【问题讨论】:
标签: python xml xpath view openerp