在Odoo8中,如何替换为xpath而不是放在后面?
看看这个奇怪的东西。 我这里的代码运行良好在Odoo8中,如何替换为xpath而不是放在后面?,xpath,replace,odoo,odoo-8,Xpath,Replace,Odoo,Odoo 8,看看这个奇怪的东西。 我这里的代码运行良好 <openerp> <data> <template id="index" inherit_id='point_of_sale.index' name="Restaurant Index"><!DOCTYPE html> <xpath expr="//title" position="after">
<openerp>
<data>
<template id="index" inherit_id='point_of_sale.index' name="Restaurant Index"><!DOCTYPE html>
<xpath expr="//title" position="after">
<title>Odoo POS - AS</title>
</xpath>
<xpath expr="//link[@id='pos-stylesheet']" position="after">
<link rel="stylesheet" href="/pos_lapagept/static/src/css/pos_as.css" />
</xpath>
</template>
</data>
</openerp>
!DOCTYPE html
奥多POS-AS
但是如果我用这个代码替换:
<xpath expr="//title" position="replace">
<title>Odoo POS - AS</title>
</xpath>
奥多POS-AS
它不能取代标题。它什么都不做。。。你明白这一点吗?试试下面的内容
<xpath expr="//title" position="attributes">
<attribute name="title">Odoo POS - AS</attribute>
</xpath>
奥多POS-AS
谢谢你的提问,实际上我想将css文件添加到标题部分。所以,从你的问题来看,我做到了。